Changeset 3736
- Timestamp:
- 09/18/07 21:24:11 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Plug-Ins/JavaScript Support/JVJavaScriptChatPlugin.h
r3667 r3736 15 15 BOOL _loading; 16 16 BOOL _errorShown; 17 BOOL _scriptGlobals Removed;17 BOOL _scriptGlobalsAdded; 18 18 } 19 19 - (id) initWithScriptAtPath:(NSString *) path withManager:(MVChatPluginManager *) manager; trunk/Plug-Ins/JavaScript Support/JVJavaScriptChatPlugin.m
r3667 r3736 101 101 102 102 - (void) release { 103 if( ( [self retainCount] - 1 ) == 1 && !_scriptGlobalsRemoved )103 if( ( [self retainCount] - 1 ) == 1 && _scriptGlobalsAdded ) 104 104 [self performSelector:@selector(removeScriptGlobalsForWebView:) withObject:_webview afterDelay:0]; 105 105 [super release]; … … 226 226 227 227 - (void) setupScriptGlobalsForWebView:(WebView *) webView { 228 _scriptGlobalsRemoved = NO; 228 if (!webView) 229 return; 230 231 _scriptGlobalsAdded = YES; 229 232 230 233 [[webView windowScriptObject] setValue:self forKey:@"Plugin"]; … … 239 242 240 243 - (void) removeScriptGlobalsForWebView:(WebView *) webView { 241 if (!webView && !_scriptGlobalsRemoved)244 if (!webView || !_scriptGlobalsAdded) 242 245 return; 243 246 244 _scriptGlobals Removed = YES;247 _scriptGlobalsAdded = NO; 245 248 246 249 [[webView windowScriptObject] removeWebScriptKey:@"Plugin"];
