Changeset 66720 in webkit
- Timestamp:
- Sep 3, 2010 3:09:25 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r66719 r66720 1 2010-09-02 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector 6 https://bugs.webkit.org/show_bug.cgi?id=44230 7 8 * inspector/Inspector.idl: 9 * inspector/InspectorController.cpp: 10 (WebCore::InspectorController::inspectedPageDestroyed): 11 (WebCore::InspectorController::close): 12 * inspector/InspectorFrontendClient.h: 13 * inspector/InspectorFrontendHost.cpp: 14 (WebCore::InspectorFrontendHost::disconnectFromBackend): don't try to notify InspectorController 15 that frontend closes if InspectorController triggered the action. 16 * inspector/InspectorFrontendHost.h: 17 * inspector/InspectorFrontendHost.idl: 18 * inspector/front-end/InspectorFrontendHostStub.js: 19 (.WebInspector.InspectorFrontendHostStub.prototype.disconnectFromBackend): 20 * inspector/front-end/inspector.js: 21 (WebInspector.disconnectFromBackend): 22 1 23 2010-09-03 Girish Ramakrishnan <girish@forwardbias.in> 2 24 -
trunk/WebCore/inspector/Inspector.idl
r66376 r66720 41 41 [notify] void childNodeInserted(out long parentId, out long prevId, out Object node); 42 42 [notify] void childNodeRemoved(out long parentId, out long id); 43 [notify] void close();44 43 [notify] void didCommitLoad(); 45 44 [notify] void evaluateForTestInFrontend(out long testCallId, out String script); 46 [notify] void inspectedPageDestroyed();45 [notify] void disconnectFromBackend(); 47 46 [notify] void inspectedURLChanged(out String url); 48 47 [notify] void monitoringXHRWasEnabled(); -
trunk/WebCore/inspector/InspectorController.cpp
r66376 r66720 199 199 { 200 200 if (m_frontend) 201 m_frontend-> inspectedPageDestroyed();201 m_frontend->disconnectFromBackend(); 202 202 203 203 hideHighlight(); … … 538 538 if (!m_frontend) 539 539 return; 540 m_frontend->close(); 540 m_frontend->disconnectFromBackend(); 541 disconnectFrontend(); 541 542 } 542 543 -
trunk/WebCore/inspector/InspectorFrontendClient.h
r66376 r66720 54 54 virtual void bringToFront() = 0; 55 55 virtual void closeWindow() = 0; 56 virtual void disconnectFromBackend() = 0; 56 57 57 58 virtual void requestAttachWindow() = 0; -
trunk/WebCore/inspector/InspectorFrontendHost.cpp
r66376 r66720 167 167 } 168 168 169 void InspectorFrontendHost::disconnectFromBackend() 170 { 171 if (m_client) { 172 m_client->disconnectFromBackend(); 173 disconnectClient(); // Disconnect from client. 174 } 175 } 176 169 177 void InspectorFrontendHost::bringToFront() 170 178 { -
trunk/WebCore/inspector/InspectorFrontendHost.h
r66376 r66720 63 63 void requestDetachWindow(); 64 64 void closeWindow(); 65 void disconnectFromBackend(); 65 66 void bringToFront(); 66 67 void inspectedURLChanged(const String&); -
trunk/WebCore/inspector/InspectorFrontendHost.idl
r66376 r66720 35 35 void loaded(); 36 36 void closeWindow(); 37 void disconnectFromBackend(); 37 38 void bringToFront(); 38 39 void inspectedURLChanged(in DOMString newURL); -
trunk/WebCore/inspector/front-end/InspectorFrontendHostStub.js
r66376 r66720 65 65 }, 66 66 67 disconnectFromBackend: function() 68 { 69 this._windowVisible = false; 70 }, 71 67 72 attach: function() 68 73 { -
trunk/WebCore/inspector/front-end/inspector.js
r66516 r66720 716 716 } 717 717 718 WebInspector. inspectedPageDestroyed = function()719 { 720 WebInspector.close();718 WebInspector.disconnectFromBackend = function() 719 { 720 InspectorFrontendHost.disconnectFromBackend(); 721 721 } 722 722 -
trunk/WebKit/chromium/ChangeLog
r66713 r66720 1 2010-09-02 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector 6 https://bugs.webkit.org/show_bug.cgi?id=44230 7 8 * src/InspectorFrontendClientImpl.cpp: 9 (WebKit::InspectorFrontendClientImpl::disconnectFromBackend): 10 * src/InspectorFrontendClientImpl.h: 11 1 12 2010-09-02 Satish Sampath <satish@chromium.org> 2 13 -
trunk/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
r66376 r66720 106 106 } 107 107 108 void InspectorFrontendClientImpl::disconnectFromBackend() 109 { 110 m_client->closeWindow(); 111 } 112 108 113 void InspectorFrontendClientImpl::requestAttachWindow() 109 114 { -
trunk/WebKit/chromium/src/InspectorFrontendClientImpl.h
r66376 r66720 62 62 virtual void bringToFront(); 63 63 virtual void closeWindow(); 64 virtual void disconnectFromBackend(); 64 65 65 66 virtual void requestAttachWindow(); -
trunk/WebKit/gtk/ChangeLog
r66577 r66720 1 2010-09-02 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector 6 https://bugs.webkit.org/show_bug.cgi?id=44230 7 8 * WebCoreSupport/InspectorClientGtk.cpp: 9 (WebKit::notifyWebViewDestroyed): 10 (WebKit::InspectorFrontendClient::destroyInspectorWindow): 11 (WebKit::InspectorFrontendClient::closeWindow): 12 (WebKit::InspectorFrontendClient::disconnectFromBackend): 13 * WebCoreSupport/InspectorClientGtk.h: 14 1 15 2010-08-31 Dave Hyatt <hyatt@apple.com> 2 16 -
trunk/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
r66376 r66720 37 37 static void notifyWebViewDestroyed(WebKitWebView* webView, InspectorFrontendClient* inspectorFrontendClient) 38 38 { 39 inspectorFrontendClient->destroyInspectorWindow( );39 inspectorFrontendClient->destroyInspectorWindow(true); 40 40 } 41 41 … … 275 275 } 276 276 277 void InspectorFrontendClient::destroyInspectorWindow( )277 void InspectorFrontendClient::destroyInspectorWindow(bool notifyInspectorController) 278 278 { 279 279 if (!m_webInspector) … … 285 285 m_inspectorWebView = 0; 286 286 287 core(m_inspectedWebView)->inspectorController()->disconnectFrontend(); 287 if (notifyInspectorController) 288 core(m_inspectedWebView)->inspectorController()->disconnectFrontend(); 288 289 289 290 if (m_inspectorClient) … … 327 328 void InspectorFrontendClient::closeWindow() 328 329 { 329 destroyInspectorWindow(); 330 destroyInspectorWindow(true); 331 } 332 333 void InspectorFrontendClient::disconnectFromBackend() 334 { 335 destroyInspectorWindow(false); 330 336 } 331 337 -
trunk/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
r66376 r66720 81 81 void disconnectInspectorClient() { m_inspectorClient = 0; } 82 82 83 void destroyInspectorWindow( );83 void destroyInspectorWindow(bool notifyInspectorController); 84 84 85 85 virtual WTF::String localizedStringsURL(); … … 89 89 virtual void bringToFront(); 90 90 virtual void closeWindow(); 91 virtual void disconnectFromBackend(); 91 92 92 93 virtual void attachWindow(); -
trunk/WebKit/mac/ChangeLog
r66685 r66720 1 2010-09-02 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector 6 https://bugs.webkit.org/show_bug.cgi?id=44230 7 8 * WebCoreSupport/WebInspectorClient.h: 9 * WebCoreSupport/WebInspectorClient.mm: 10 (WebInspectorFrontendClient::closeWindow): 11 (WebInspectorFrontendClient::disconnectFromBackend): 12 (-[WebInspectorWindowController windowShouldClose:]): 13 (-[WebInspectorWindowController destroyInspectorView:]): 14 1 15 2010-09-02 Steve Block <steveblock@google.com> 2 16 -
trunk/WebKit/mac/WebCoreSupport/WebInspectorClient.h
r66376 r66720 85 85 virtual void bringToFront(); 86 86 virtual void closeWindow(); 87 virtual void disconnectFromBackend(); 87 88 88 89 virtual void attachWindow(); -
trunk/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
r66376 r66720 67 67 - (void)setInspectorClient:(WebInspectorClient*)inspectorClient; 68 68 - (void)setAttachedWindowHeight:(unsigned)height; 69 - (void)destroyInspectorView ;69 - (void)destroyInspectorView:(bool)notifyInspectorController; 70 70 @end 71 71 … … 170 170 void WebInspectorFrontendClient::closeWindow() 171 171 { 172 [m_windowController.get() destroyInspectorView]; 172 [m_windowController.get() destroyInspectorView:true]; 173 } 174 175 void WebInspectorFrontendClient::disconnectFromBackend() 176 { 177 [m_windowController.get() destroyInspectorView:false]; 173 178 } 174 179 … … 309 314 - (BOOL)windowShouldClose:(id)sender 310 315 { 311 [self destroyInspectorView ];316 [self destroyInspectorView:true]; 312 317 313 318 return YES; … … 440 445 } 441 446 442 - (void)destroyInspectorView 447 - (void)destroyInspectorView:(bool)notifyInspectorController 443 448 { 444 449 if (_destroyingInspectorView) … … 451 456 _visible = NO; 452 457 453 if (Page* inspectedPage = [_inspectedWebView page]) 454 inspectedPage->inspectorController()->disconnectFrontend(); 455 456 _inspectorClient->releaseFrontendPage(); 458 if (notifyInspectorController) { 459 if (Page* inspectedPage = [_inspectedWebView page]) 460 inspectedPage->inspectorController()->disconnectFrontend(); 461 462 _inspectorClient->releaseFrontendPage(); 463 } 457 464 458 465 [_webView close]; -
trunk/WebKit/qt/ChangeLog
r66667 r66720 1 2010-09-02 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector 6 https://bugs.webkit.org/show_bug.cgi?id=44230 7 8 * WebCoreSupport/InspectorClientQt.cpp: 9 (WebCore::InspectorClientQt::inspectorDestroyed): 10 (WebCore::InspectorClientQt::openInspectorFrontend): 11 (WebCore::InspectorClientQt::releaseFrontendPage): 12 (WebCore::InspectorFrontendClientQt::closeWindow): 13 (WebCore::InspectorFrontendClientQt::disconnectFromBackend): 14 (WebCore::InspectorFrontendClientQt::destroyInspectorView): 15 (WebCore::InspectorFrontendClientQt::inspectorClientDestroyed): 16 * WebCoreSupport/InspectorClientQt.h: 17 1 18 2010-09-02 Andreas Kling <andreas.kling@nokia.com> 2 19 -
trunk/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
r66376 r66720 101 101 void InspectorClientQt::inspectorDestroyed() 102 102 { 103 if (m_frontendClient) 104 m_frontendClient->inspectorClientDestroyed(); 103 105 delete this; 104 106 } … … 132 134 inspector->d->setFrontend(inspectorView); 133 135 134 inspectorView->page()->d->page->inspectorController()->setInspectorFrontendClient(new InspectorFrontendClientQt(m_inspectedWebPage, inspectorView, this)); 136 m_frontendClient = new InspectorFrontendClientQt(m_inspectedWebPage, inspectorView, this); 137 inspectorView->page()->d->page->inspectorController()->setInspectorFrontendClient(m_frontendClient); 135 138 m_frontendWebPage = inspectorPage; 136 139 } … … 139 142 { 140 143 m_frontendWebPage = 0; 144 m_frontendClient = 0; 141 145 } 142 146 … … 276 280 void InspectorFrontendClientQt::closeWindow() 277 281 { 282 destroyInspectorView(true); 283 } 284 285 void InspectorFrontendClientQt::disconnectFromBackend() 286 { 287 destroyInspectorView(false); 288 } 289 290 void InspectorFrontendClientQt::attachWindow() 291 { 292 notImplemented(); 293 } 294 295 void InspectorFrontendClientQt::detachWindow() 296 { 297 notImplemented(); 298 } 299 300 void InspectorFrontendClientQt::setAttachedWindowHeight(unsigned) 301 { 302 notImplemented(); 303 } 304 305 void InspectorFrontendClientQt::inspectedURLChanged(const String& newURL) 306 { 307 m_inspectedURL = newURL; 308 updateWindowTitle(); 309 } 310 311 void InspectorFrontendClientQt::updateWindowTitle() 312 { 313 if (m_inspectedWebPage->d->inspector) { 314 QString caption = QCoreApplication::translate("QWebPage", "Web Inspector - %2").arg(m_inspectedURL); 315 m_inspectedWebPage->d->inspector->setWindowTitle(caption); 316 } 317 } 318 319 void InspectorFrontendClientQt::destroyInspectorView(bool notifyInspectorController) 320 { 278 321 if (m_destroyingInspectorView) 279 322 return; 280 323 m_destroyingInspectorView = true; 281 324 282 // Clear reference from QWebInspector to the frontend view. 283 m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(0); 325 // Inspected page may have already been destroyed. 326 if (m_inspectedWebPage) { 327 // Clear reference from QWebInspector to the frontend view. 328 m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(0); 329 } 330 284 331 #if ENABLE(INSPECTOR) 285 m_inspectedWebPage->d->inspectorController()->disconnectFrontend(); 332 if (notifyInspectorController) 333 m_inspectedWebPage->d->inspectorController()->disconnectFrontend(); 286 334 #endif 287 m_inspectorClient->releaseFrontendPage(); 335 if (m_inspectorClient) 336 m_inspectorClient->releaseFrontendPage(); 288 337 289 338 // Clear pointer before deleting WebView to avoid recursive calls to its destructor. … … 291 340 } 292 341 293 void InspectorFrontendClientQt::attachWindow() 294 { 295 notImplemented(); 296 } 297 298 void InspectorFrontendClientQt::detachWindow() 299 { 300 notImplemented(); 301 } 302 303 void InspectorFrontendClientQt::setAttachedWindowHeight(unsigned) 304 { 305 notImplemented(); 306 } 307 308 void InspectorFrontendClientQt::inspectedURLChanged(const String& newURL) 309 { 310 m_inspectedURL = newURL; 311 updateWindowTitle(); 312 } 313 314 void InspectorFrontendClientQt::updateWindowTitle() 315 { 316 if (m_inspectedWebPage->d->inspector) { 317 QString caption = QCoreApplication::translate("QWebPage", "Web Inspector - %2").arg(m_inspectedURL); 318 m_inspectedWebPage->d->inspector->setWindowTitle(caption); 319 } 342 void InspectorFrontendClientQt::inspectorClientDestroyed() 343 { 344 m_inspectorClient = 0; 345 m_inspectedWebPage = 0; 320 346 } 321 347 -
trunk/WebKit/qt/WebCoreSupport/InspectorClientQt.h
r66376 r66720 42 42 43 43 namespace WebCore { 44 class InspectorFrontendClientQt; 44 45 class Node; 45 46 class Page; … … 66 67 QWebPage* m_inspectedWebPage; 67 68 QWebPage* m_frontendWebPage; 69 InspectorFrontendClientQt* m_frontendClient; 68 70 }; 69 71 … … 80 82 virtual void bringToFront(); 81 83 virtual void closeWindow(); 84 virtual void disconnectFromBackend(); 82 85 83 86 virtual void attachWindow(); … … 88 91 virtual void inspectedURLChanged(const String& newURL); 89 92 93 void inspectorClientDestroyed(); 94 90 95 private: 91 96 void updateWindowTitle(); 97 void destroyInspectorView(bool notifyInspectorController); 92 98 QWebPage* m_inspectedWebPage; 93 99 OwnPtr<QWebView> m_inspectorView; -
trunk/WebKit/win/ChangeLog
r66623 r66720 1 2010-09-02 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by PavelFeldman. 4 5 REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector 6 https://bugs.webkit.org/show_bug.cgi?id=44230 7 8 * WebCoreSupport/WebInspectorClient.cpp: 9 (WebInspectorFrontendClient::~WebInspectorFrontendClient): 10 (WebInspectorFrontendClient::closeWindow): 11 (WebInspectorFrontendClient::disconnectFromBackend): 12 (WebInspectorFrontendClient::closeWindowWithoutNotifications): 13 (WebInspectorFrontendClient::destroyInspectorView): 14 * WebCoreSupport/WebInspectorClient.h: 15 1 16 2010-09-01 Jessie Berlin <jberlin@apple.com> 2 17 -
trunk/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
r66376 r66720 229 229 WebInspectorFrontendClient::~WebInspectorFrontendClient() 230 230 { 231 destroyInspectorView( );231 destroyInspectorView(true); 232 232 } 233 233 … … 261 261 void WebInspectorFrontendClient::closeWindow() 262 262 { 263 destroyInspectorView(); 263 destroyInspectorView(true); 264 } 265 266 void WebInspectorFrontendClient::disconnectFromBackend() 267 { 268 destroyInspectorView(false); 264 269 } 265 270 … … 345 350 if (SUCCEEDED(m_inspectedWebView->hostWindow((OLE_HANDLE*)&hostWindow))) 346 351 SendMessage(hostWindow, WM_SIZE, 0, 0); 347 348 m_inspectorClient->updateHighlight();349 352 } 350 353 … … 398 401 } 399 402 400 void WebInspectorFrontendClient::destroyInspectorView( )403 void WebInspectorFrontendClient::destroyInspectorView(bool notifyInspectorController) 401 404 { 402 405 if (m_destroyingInspectorView) … … 404 407 m_destroyingInspectorView = true; 405 408 406 m_inspectedWebView->page()->inspectorController()->disconnectFrontend();407 409 408 410 closeWindowWithoutNotifications(); 409 m_inspectorClient->frontendClosing(); 411 412 if (notifyInspectorController) { 413 m_inspectedWebView->page()->inspectorController()->disconnectFrontend(); 414 m_inspectorClient->updateHighlight(); 415 m_inspectorClient->frontendClosing(); 416 } 410 417 ::DestroyWindow(m_frontendHwnd); 411 418 } -
trunk/WebKit/win/WebCoreSupport/WebInspectorClient.h
r66376 r66720 94 94 virtual void bringToFront(); 95 95 virtual void closeWindow(); 96 virtual void disconnectFromBackend(); 96 97 97 98 virtual void attachWindow(); … … 107 108 void showWindowWithoutNotifications(); 108 109 109 void destroyInspectorView( );110 void destroyInspectorView(bool notifyInspectorController); 110 111 111 112 void updateWindowTitle();
Note: See TracChangeset
for help on using the changeset viewer.