Changeset 70267 in webkit
- Timestamp:
- Oct 21, 2010 2:46:10 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r70265 r70267 1 2010-10-21 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Adam Roben. 4 5 Crash evaluating JavaScript string that throws an exception 6 https://bugs.webkit.org/show_bug.cgi?id=48092 7 <rdar://problem/8487657> 8 9 * UIProcess/WebProcessProxy.cpp: 10 (WebKit::WebProcessProxy::sendMessage): 11 m_connection can be null here; just return false if that is the case. 12 13 * WebProcess/WebPage/WebPage.cpp: 14 (WebKit::WebPage::runJavaScriptInMainFrame): 15 If the JSValue returned is null we just send along a null string. 16 1 17 2010-10-21 Adam Roben <aroben@apple.com> 2 18 -
trunk/WebKit2/UIProcess/WebProcessProxy.cpp
r69056 r70267 106 106 return true; 107 107 } 108 108 109 // If the web process has exited, m_connection will be null here. 110 if (!m_connection) 111 return false; 112 109 113 return m_connection->sendMessage(messageID, arguments); 110 114 } -
trunk/WebKit2/WebProcess/WebPage/WebPage.cpp
r70255 r70267 683 683 JSLock lock(SilenceAssertionsOnly); 684 684 JSValue resultValue = m_mainFrame->coreFrame()->script()->executeScript(script, true).jsValue(); 685 String resultString = ustringToString(resultValue.toString(m_mainFrame->coreFrame()->script()->globalObject(mainThreadNormalWorld())->globalExec())); 685 String resultString; 686 if (resultValue) 687 resultString = ustringToString(resultValue.toString(m_mainFrame->coreFrame()->script()->globalObject(mainThreadNormalWorld())->globalExec())); 686 688 687 689 WebProcess::shared().connection()->send(Messages::WebPageProxy::DidRunJavaScriptInMainFrame(resultString, callbackID), m_pageID); -
trunk/WebKitTools/ChangeLog
r70265 r70267 1 2010-10-21 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Adam Roben. 4 5 Crash evaluating JavaScript string that throws an exception 6 https://bugs.webkit.org/show_bug.cgi?id=48092 7 <rdar://problem/8487657> 8 9 Add a test that evaluates a JavaScript string that throws an exception and check that 10 the callback is called. 11 12 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 13 * TestWebKitAPI/Tests/WebKit2/EvaluateJavaScript.cpp: Added. 14 (TestWebKitAPI::didRunJavaScript): 15 (TestWebKitAPI::WebKit2_EvaluateJavaScript): 16 * TestWebKitAPI/win/TestWebKitAPI.vcproj: 17 1 18 2010-10-21 Adam Roben <aroben@apple.com> 2 19 -
trunk/WebKitTools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r70244 r70267 10 10 1A02C84F125D4A8400E3F4BD /* Find.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A02C84E125D4A8400E3F4BD /* Find.cpp */; }; 11 11 1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1A02C84B125D4A5E00E3F4BD /* find.html */; }; 12 1A5FEFDD1270E2A3000E2921 /* EvaluateJavaScript.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */; }; 12 13 BC131885117114B600B69727 /* PlatformUtilitiesMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC131884117114B600B69727 /* PlatformUtilitiesMac.mm */; }; 13 14 BC131A9B1171316900B69727 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC131A9A1171316900B69727 /* main.mm */; }; … … 82 83 1A02C84B125D4A5E00E3F4BD /* find.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = find.html; sourceTree = "<group>"; }; 83 84 1A02C84E125D4A8400E3F4BD /* Find.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Find.cpp; sourceTree = "<group>"; }; 85 1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvaluateJavaScript.cpp; sourceTree = "<group>"; }; 84 86 8DD76FA10486AA7600D96B5E /* TestWebKitAPI */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TestWebKitAPI; sourceTree = BUILT_PRODUCTS_DIR; }; 85 87 BC131883117114A800B69727 /* PlatformUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformUtilities.h; sourceTree = "<group>"; }; … … 224 226 children = ( 225 227 BC90977B125571AE00083756 /* Resources */, 228 1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */, 226 229 1A02C84E125D4A8400E3F4BD /* Find.cpp */, 227 230 BCBD370F125AA2EB00D2C29F /* FrameMIMETypeHTML.cpp */, … … 374 377 BC575BC0126F5752006F0F12 /* PlatformUtilities.cpp in Sources */, 375 378 BCB68040126FBFE100642A61 /* DocumentStartUserScriptAlertCrash.cpp in Sources */, 379 1A5FEFDD1270E2A3000E2921 /* EvaluateJavaScript.cpp in Sources */, 376 380 ); 377 381 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebKitTools/TestWebKitAPI/win/TestWebKitAPI.vcproj
r70247 r70267 418 418 > 419 419 <File 420 RelativePath="..\Tests\WebKit2\EvaluateJavaScript.cpp" 421 > 422 </File> 423 <File 420 424 RelativePath="..\Tests\WebKit2\FailedLoad.cpp" 421 425 >
Note: See TracChangeset
for help on using the changeset viewer.