Changeset 108724 in webkit
- Timestamp:
- Feb 23, 2012 8:58:34 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r108722 r108724 1 2012-02-23 Greg Billock <gbillock@google.com> 2 3 Don't clear IntentRequest callback pointers on stop() 4 5 This causes re-entry into ScriptExecutionContext when 6 the ActiveDOMCallback objects get deleted, which crashes. 7 Instead, just de-activate the object and wait for 8 context destruction to clean up. 9 10 Test crashes consistently without fix and passes with fix. 11 Added some test infrastructure to support this test. 12 https://bugs.webkit.org/show_bug.cgi?id=78638 13 14 Reviewed by Adam Barth. 15 16 * Modules/intents/IntentRequest.cpp: 17 (WebCore::IntentRequest::IntentRequest): 18 (WebCore::IntentRequest::stop): 19 (WebCore::IntentRequest::postResult): 20 (WebCore::IntentRequest::postFailure): 21 * Modules/intents/IntentRequest.h: 22 (IntentRequest): 23 1 24 2012-02-23 Konrad Piascik <kpiascik@rim.com> 2 25 -
trunk/Source/WebCore/Modules/intents/IntentRequest.cpp
r107239 r108724 55 55 , m_successCallback(successCallback) 56 56 , m_errorCallback(errorCallback) 57 , m_stopped(false) 57 58 { 58 59 } … … 61 62 { 62 63 ContextDestructionObserver::contextDestroyed(); 63 m_successCallback.clear(); 64 m_errorCallback.clear(); 64 m_stopped = true; 65 65 } 66 66 67 67 void IntentRequest::stop() 68 68 { 69 m_successCallback.clear(); 70 m_errorCallback.clear(); 69 m_stopped = true; 71 70 } 72 71 73 72 void IntentRequest::postResult(SerializedScriptValue* data) 74 73 { 74 if (m_stopped) 75 return; 76 75 77 // Callback could lead to deletion of this. 76 78 RefPtr<IntentRequest> protector(this); … … 87 89 void IntentRequest::postFailure(SerializedScriptValue* data) 88 90 { 91 if (m_stopped) 92 return; 93 89 94 // Callback could lead to deletion of this. 90 95 RefPtr<IntentRequest> protector(this); -
trunk/Source/WebCore/Modules/intents/IntentRequest.h
r104531 r108724 61 61 RefPtr<IntentResultCallback> m_successCallback; 62 62 RefPtr<IntentResultCallback> m_errorCallback; 63 bool m_stopped; 63 64 }; 64 65 -
trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp
r108487 r108724 48 48 #include "WebGeolocationClientMock.h" 49 49 #include "WebHistoryItem.h" 50 #include "WebIntent.h" 50 51 #include "WebKit.h" 51 52 #include "WebNode.h" … … 1312 1313 1313 1314 return false; 1315 } 1316 1317 void WebViewHost::dispatchIntent(WebFrame* source, const WebIntentRequest& request) 1318 { 1319 printf("Received Web Intent: action=%s type=%s\n", 1320 request.intent().action().utf8().data(), 1321 request.intent().type().utf8().data()); 1322 m_currentRequest = request; 1314 1323 } 1315 1324 -
trunk/Tools/DumpRenderTree/chromium/WebViewHost.h
r108487 r108724 38 38 #include "WebCursorInfo.h" 39 39 #include "WebFrameClient.h" 40 #include "WebIntentRequest.h" 40 41 #include "WebSpellCheckClient.h" 41 42 #include "WebViewClient.h" … … 238 239 virtual void openFileSystem(WebKit::WebFrame*, WebKit::WebFileSystem::Type, long long size, bool create, WebKit::WebFileSystemCallbacks*); 239 240 virtual bool willCheckAndDispatchMessageEvent(WebKit::WebFrame* source, WebKit::WebSecurityOrigin target, WebKit::WebDOMMessageEvent); 241 virtual void dispatchIntent(WebKit::WebFrame* source, const WebKit::WebIntentRequest&); 240 242 241 243 WebKit::WebDeviceOrientationClientMock* deviceOrientationClientMock(); … … 411 413 } m_pointerLockPlannedResult; 412 414 #endif 415 416 // For web intents: holds the current request, if any. 417 WebKit::WebIntentRequest m_currentRequest; 413 418 }; 414 419
Note: See TracChangeset
for help on using the changeset viewer.