Changeset 73914 in webkit
- Timestamp:
- Dec 13, 2010 7:16:03 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 45 added
- 35 edited
- 2 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r73913 r73914 1 2010-12-13 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 WebCore doesn't fire window.onerror event when uncaught JavaScript exceptions are thrown 6 https://bugs.webkit.org/show_bug.cgi?id=8519 7 8 Uncaught exceptions are propagated to window.onerror hander if one is present. 9 The handler is expected to be a function accepting three arguments: error message, 10 resource url and line number where the exception occured. 11 12 * fast/events/resources/window-onerror.js: Added. 13 (throwException): 14 * fast/events/window-onerror1-expected.txt: Added. 15 * fast/events/window-onerror1.html: Added. 16 * fast/events/window-onerror10-expected.txt: Added. 17 * fast/events/window-onerror10.html: Added. 18 * fast/events/window-onerror11-expected.txt: Added. 19 * fast/events/window-onerror11.html: Added. 20 * fast/events/window-onerror2-expected.txt: Added. 21 * fast/events/window-onerror2.html: Added. 22 * fast/events/window-onerror3-expected.txt: Added. 23 * fast/events/window-onerror3.html: Added. 24 * fast/events/window-onerror4-expected.txt: Added. 25 * fast/events/window-onerror4.html: Added. 26 * fast/events/window-onerror5-expected.txt: Added. 27 * fast/events/window-onerror5.html: Added. 28 * fast/events/window-onerror6-expected.txt: Added. 29 * fast/events/window-onerror6.html: Added. 30 * fast/events/window-onerror7-expected.txt: Added. 31 * fast/events/window-onerror7.html: Added. 32 * fast/events/window-onerror8-expected.txt: Added. 33 * fast/events/window-onerror8.html: Added. 34 * fast/events/window-onerror9-expected.txt: Added. 35 * fast/events/window-onerror9.html: Added. 36 * fast/workers/worker-script-error-expected.txt: 37 * http/tests/security/resources/onerror-iframe.html: Added. 38 * http/tests/security/window-onerror-exception-in-iframe-expected.txt: Added. 39 * http/tests/security/window-onerror-exception-in-iframe.html: Added. 40 * platform/chromium-win/fast/workers/worker-script-error-expected.txt: 41 * platform/chromium/fast/events/window-onerror1-expected.txt: Added. 42 * platform/chromium/fast/events/window-onerror10-expected.txt: Added. 43 * platform/chromium/fast/events/window-onerror11-expected.txt: Added. 44 * platform/chromium/fast/events/window-onerror2-expected.txt: Added. 45 * platform/chromium/fast/events/window-onerror3-expected.txt: Added. 46 * platform/chromium/fast/events/window-onerror4-expected.txt: Added. 47 * platform/chromium/fast/events/window-onerror5-expected.txt: Added. 48 * platform/chromium/fast/events/window-onerror6-expected.txt: Added. 49 * platform/chromium/fast/events/window-onerror7-expected.txt: Added. 50 * platform/chromium/fast/events/window-onerror8-expected.txt: Added. 51 * platform/chromium/fast/events/window-onerror9-expected.txt: Added. 52 * platform/chromium/http/tests/security/window-onerror-exception-in-iframe-expected.txt: Added. 53 * platform/chromium/userscripts/window-onerror-for-isolated-world-1-expected.txt: Added. 54 * platform/chromium/userscripts/window-onerror-for-isolated-world-2-expected.txt: Added. 55 * userscripts/window-onerror-for-isolated-world-1-expected.txt: Added. 56 * userscripts/window-onerror-for-isolated-world-1.html: Added. 57 * userscripts/window-onerror-for-isolated-world-2-expected.txt: Added. 58 * userscripts/window-onerror-for-isolated-world-2.html: Added. 59 1 60 2010-12-08 Alexander Pavlov <apavlov@chromium.org> 2 61 -
trunk/LayoutTests/fast/workers/worker-script-error-expected.txt
r57134 r73914 5 5 PASS: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 1. 6 6 PASS: event listener invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 1. 7 PASS: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 7. 7 8 PASS: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: bar' at line 3. 8 PASS: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 7.9 9 PASS: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 7. 10 10 PASS: onerror invoked for a script that has script error 'ReferenceError: Can't find variable: foo' at line 7. -
trunk/LayoutTests/platform/chromium-win/fast/workers/worker-script-error-expected.txt
r57147 r73914 4 4 PASS: onerror invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 1. 5 5 PASS: event listener invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 1. 6 PASS: onerror invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 7. 6 7 PASS: onerror invoked for a script that has script error 'Uncaught ReferenceError: bar is not defined' at line 3. 7 PASS: onerror invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 7.8 8 PASS: onerror invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 7. 9 9 PASS: onerror invoked for a script that has script error 'Uncaught ReferenceError: foo is not defined' at line 7. -
trunk/LayoutTests/platform/gtk/Skipped
r73886 r73914 4710 4710 userscripts/user-script-video-document.html 4711 4711 userscripts/user-style-top-frame-only.html 4712 userscripts/window-onerror-for-isolated-world-1.html 4713 userscripts/window-onerror-for-isolated-world-2.html 4712 4714 4713 4715 # XHR sends sometimes yield null bytes sent instead of 0. -
trunk/WebCore/Android.jscbindings.mk
r72590 r73914 103 103 bindings/js/JSDocumentCustom.cpp \ 104 104 bindings/js/JSElementCustom.cpp \ 105 bindings/js/JSErrorHandler.cpp \ 105 106 bindings/js/JSEventCustom.cpp \ 106 107 bindings/js/JSEventListener.cpp \ … … 171 172 bindings/js/JSWorkerContextBase.cpp \ 172 173 bindings/js/JSWorkerContextCustom.cpp \ 173 bindings/js/JSWorkerContextErrorHandler.cpp \174 174 bindings/js/JSWorkerCustom.cpp \ 175 175 bindings/js/JSXMLHttpRequestCustom.cpp \ -
trunk/WebCore/CMakeLists.txt
r73886 r73914 635 635 bindings/js/JSDocumentCustom.cpp 636 636 bindings/js/JSElementCustom.cpp 637 bindings/js/JSErrorHandler.cpp 637 638 bindings/js/JSEventCustom.cpp 638 639 bindings/js/JSEventListener.cpp … … 704 705 bindings/js/JSWorkerContextBase.cpp 705 706 bindings/js/JSWorkerContextCustom.cpp 706 bindings/js/JSWorkerContextErrorHandler.cpp707 707 bindings/js/JSWorkerCustom.cpp 708 708 bindings/js/JSXMLHttpRequestCustom.cpp -
trunk/WebCore/ChangeLog
r73913 r73914 1 2010-12-13 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 WebCore doesn't fire window.onerror event when uncaught JavaScript exceptions are thrown 6 https://bugs.webkit.org/show_bug.cgi?id=8519 7 8 Uncaught exceptions are propagated to window.onerror hander if one is present. 9 The handler is expected to be a function accepting three arguments: error message, 10 resource url and line number where the exception occured. 11 12 It was decided to dispatch ErrorEvent to all listeners/handlers no matter if they 13 were created in the same isolated world where the exception occured or not. 14 15 Tests: fast/events/window-onerror1.html 16 fast/events/window-onerror10.html 17 fast/events/window-onerror11.html 18 fast/events/window-onerror2.html 19 fast/events/window-onerror3.html 20 fast/events/window-onerror4.html 21 fast/events/window-onerror5.html 22 fast/events/window-onerror6.html 23 fast/events/window-onerror7.html 24 fast/events/window-onerror8.html 25 fast/events/window-onerror9.html 26 http/tests/security/window-onerror-exception-in-iframe.html 27 userscripts/window-onerror-for-isolated-world-1.html 28 userscripts/window-onerror-for-isolated-world-2.html 29 30 * Android.jscbindings.mk: 31 * CMakeLists.txt: 32 * GNUmakefile.am: 33 * WebCore.gypi: 34 * WebCore.order: 35 * WebCore.pro: 36 * WebCore.vcproj/WebCore.vcproj: 37 * WebCore.xcodeproj/project.pbxproj: 38 * bindings/js/JSBindingsAllInOne.cpp: 39 * bindings/js/JSDOMBinding.cpp: 40 (WebCore::reportException): 41 * bindings/js/JSErrorHandler.cpp: Renamed from WebCore/bindings/js/JSWorkerContextErrorHandler.cpp. 42 (WebCore::JSErrorHandler::JSErrorHandler): 43 (WebCore::JSErrorHandler::~JSErrorHandler): 44 (WebCore::JSErrorHandler::handleEvent): 45 * bindings/js/JSErrorHandler.h: Copied from WebCore/bindings/js/JSWorkerContextErrorHandler.h. 46 (WebCore::JSErrorHandler::create): 47 (WebCore::createJSErrorHandler): 48 * bindings/scripts/CodeGeneratorJS.pm: 49 * bindings/scripts/CodeGeneratorV8.pm: 50 * bindings/v8/V8ConsoleMessage.cpp: 51 (WebCore::V8ConsoleMessage::dispatchNow): 52 (WebCore::V8ConsoleMessage::handler): the method was changed to use generic WebCore exception 53 reporting mechanism which is also used by JSC bindings. 54 * bindings/v8/V8ConsoleMessage.h: 55 * bindings/v8/V8WindowErrorHandler.cpp: Copied from WebCore/bindings/js/JSWorkerContextErrorHandler.h. 56 (WebCore::V8WindowErrorHandler::V8WindowErrorHandler): 57 (WebCore::V8WindowErrorHandler::callListenerFunction): 58 * bindings/v8/V8WindowErrorHandler.h: Renamed from WebCore/bindings/js/JSWorkerContextErrorHandler.h. 59 (WebCore::V8WindowErrorHandler::create): 60 * bindings/v8/WorkerContextExecutionProxy.cpp: 61 (WebCore::v8MessageHandler): 62 * bindings/v8/WorkerScriptController.cpp: 63 (WebCore::WorkerScriptController::evaluate): 64 * dom/Document.cpp: 65 (WebCore::Document::errorEventTarget): 66 (WebCore::Document::logExceptionToConsole): 67 * dom/Document.h: 68 * dom/ScriptExecutionContext.cpp: 69 (WebCore::ScriptExecutionContext::PendingException::PendingException): 70 (WebCore::ScriptExecutionContext::ScriptExecutionContext): 71 (WebCore::ScriptExecutionContext::reportException): this method is not virtual anymore to 72 ensure that error event dispatching algorithm is the same in WorkerContext and in Document. 73 (WebCore::ScriptExecutionContext::dispatchErrorEvent): 74 * dom/ScriptExecutionContext.h: 75 * workers/DefaultSharedWorkerRepository.cpp: 76 (WebCore::postExceptionTask): 77 * workers/WorkerContext.cpp: 78 (WebCore::WorkerContext::WorkerContext): 79 (WebCore::WorkerContext::errorEventTarget): 80 (WebCore::WorkerContext::logExceptionToConsole): 81 * workers/WorkerContext.h: 82 * workers/WorkerMessagingProxy.cpp: 83 (WebCore::WorkerExceptionTask::performTask): 84 1 85 2010-12-08 Alexander Pavlov <apavlov@chromium.org> 2 86 -
trunk/WebCore/GNUmakefile.am
r73886 r73914 774 774 WebCore/bindings/js/JSEntryCustom.cpp \ 775 775 WebCore/bindings/js/JSEntrySyncCustom.cpp \ 776 WebCore/bindings/js/JSErrorHandler.cpp \ 777 WebCore/bindings/js/JSErrorHandler.h \ 776 778 WebCore/bindings/js/JSEventCustom.cpp \ 777 779 WebCore/bindings/js/JSEventListener.cpp \ … … 871 873 WebCore/bindings/js/JSWorkerContextBase.h \ 872 874 WebCore/bindings/js/JSWorkerContextCustom.cpp \ 873 WebCore/bindings/js/JSWorkerContextErrorHandler.cpp \874 WebCore/bindings/js/JSWorkerContextErrorHandler.h \875 875 WebCore/bindings/js/JSWorkerCustom.cpp \ 876 876 WebCore/bindings/js/JSXMLHttpRequestCustom.cpp \ -
trunk/WebCore/WebCore.gypi
r73886 r73914 626 626 'bindings/js/JSEntryCustom.cpp', 627 627 'bindings/js/JSEntrySyncCustom.cpp', 628 'bindings/js/JSErrorHandler.cpp', 629 'bindings/js/JSErrorHandler.h', 628 630 'bindings/js/JSEventCustom.cpp', 629 631 'bindings/js/JSEventListener.cpp', … … 723 725 'bindings/js/JSWorkerContextBase.h', 724 726 'bindings/js/JSWorkerContextCustom.cpp', 725 'bindings/js/JSWorkerContextErrorHandler.cpp',726 'bindings/js/JSWorkerContextErrorHandler.h',727 727 'bindings/js/JSWorkerCustom.cpp', 728 728 'bindings/js/JSXMLHttpRequestCustom.cpp', … … 987 987 'bindings/v8/V8Utilities.cpp', 988 988 'bindings/v8/V8Utilities.h', 989 'bindings/v8/V8WindowErrorHandler.cpp', 990 'bindings/v8/V8WindowErrorHandler.h', 989 991 'bindings/v8/V8WorkerContextErrorHandler.cpp', 990 992 'bindings/v8/V8WorkerContextErrorHandler.h', -
trunk/WebCore/WebCore.order
r73121 r73914 25210 25210 __ZN7WebCore17WorkerSharedTimer11setFireTimeEd 25211 25211 __ZN7WebCore15ScheduledAction7executeEPNS_13WorkerContextE 25212 __ZN7WebCore27JSWorkerContextErrorHandlerC1EPN3JSC8JSObjectES3_bPNS_15DOMWrapperWorldE25213 __ZN7WebCore27JSWorkerContextErrorHandlerC2EPN3JSC8JSObjectES3_bPNS_15DOMWrapperWorldE25214 25212 __ZN7WebCore10ErrorEventC1ERKNS_6StringES3_j 25215 25213 __ZN7WebCore10ErrorEventC2ERKNS_6StringES3_j 25216 __ZN7WebCore27JSWorkerContextErrorHandler11handleEventEPNS_22ScriptExecutionContextEPNS_5EventE25217 25214 __ZN7WebCore10ErrorEventD0Ev 25218 __ZN7WebCore27JSWorkerContextErrorHandlerD0Ev25219 25215 __ZN7WebCore17jsWorkerOnmessageEPN3JSC9ExecStateENS0_7JSValueERKNS0_10IdentifierE 25220 25216 __ZN7WebCore34jsWorkerPrototypeFunctionTerminateEPN3JSC9ExecStateEPNS0_8JSObjectENS0_7JSValueERKNS0_7ArgListE -
trunk/WebCore/WebCore.pro
r73892 r73914 386 386 bindings/v8/V8Proxy.cpp \ 387 387 bindings/v8/V8Utilities.cpp \ 388 bindings/v8/V8WindowErrorHandler.cpp \ 388 389 bindings/v8/V8WorkerContextEventListener.cpp \ 389 390 bindings/v8/WorkerContextExecutionProxy.cpp \ … … 530 531 bindings/js/JSDocumentCustom.cpp \ 531 532 bindings/js/JSElementCustom.cpp \ 533 bindings/js/JSErrorHandler.cpp \ 532 534 bindings/js/JSEventCustom.cpp \ 533 535 bindings/js/JSEventListener.cpp \ … … 589 591 bindings/js/JSWebKitCSSMatrixCustom.cpp \ 590 592 bindings/js/JSWebKitPointCustom.cpp \ 591 bindings/js/JSWorkerContextErrorHandler.cpp \592 593 bindings/js/JSXMLHttpRequestCustom.cpp \ 593 594 bindings/js/JSXMLHttpRequestUploadCustom.cpp \ … … 1461 1462 bindings/v8/V8Proxy.h \ 1462 1463 bindings/v8/V8Utilities.h \ 1464 bindings/v8/V8WindowErrorHandler.h \ 1463 1465 bindings/v8/V8WorkerContextEventListener.h \ 1464 1466 bindings/v8/WorkerContextExecutionProxy.h \ … … 1487 1489 bindings/js/JSDOMWindowShell.h \ 1488 1490 bindings/js/JSDOMWrapper.h \ 1491 bindings/js/JSErrorHandler.h \ 1489 1492 bindings/js/JSEventListener.h \ 1490 1493 bindings/js/JSEventTarget.h \ … … 1504 1507 bindings/js/JSStorageCustom.h \ 1505 1508 bindings/js/JSWorkerContextBase.h \ 1506 bindings/js/JSWorkerContextErrorHandler.h \1507 1509 bindings/js/JavaScriptCallFrame.h \ 1508 1510 bindings/js/ScheduledAction.h \ -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r73887 r73914 57923 57923 <File 57924 57924 RelativePath="..\bindings\js\JSDOMWindowShell.cpp" 57925 RelativePath="..\bindings\js\JSErrorHandler.cpp" 57925 57926 > 57926 57927 <FileConfiguration … … 57941 57942 </FileConfiguration> 57942 57943 <FileConfiguration 57944 Name="Debug_Internal|Win32" 57945 ExcludedFromBuild="true" 57946 > 57947 <Tool 57948 Name="VCCLCompilerTool" 57949 /> 57950 </FileConfiguration> 57951 <FileConfiguration 57952 Name="Debug_Cairo|Win32" 57953 ExcludedFromBuild="true" 57954 > 57955 <Tool 57956 Name="VCCLCompilerTool" 57957 /> 57958 </FileConfiguration> 57959 <FileConfiguration 57960 Name="Release_Cairo|Win32" 57961 ExcludedFromBuild="true" 57962 > 57963 <Tool 57964 Name="VCCLCompilerTool" 57965 /> 57966 </FileConfiguration> 57967 <FileConfiguration 57968 Name="Debug_All|Win32" 57969 ExcludedFromBuild="true" 57970 > 57971 <Tool 57972 Name="VCCLCompilerTool" 57973 /> 57974 </FileConfiguration> 57975 </File> 57976 <File 57977 RelativePath="..\bindings\js\JSErrorHandler.h" 57978 > 57979 </File> 57980 <File 57981 RelativePath="..\bindings\js\JSEventCustom.cpp" 57982 > 57983 <FileConfiguration 57984 Name="Debug|Win32" 57985 ExcludedFromBuild="true" 57986 > 57987 <Tool 57988 Name="VCCLCompilerTool" 57989 /> 57990 </FileConfiguration> 57991 <FileConfiguration 57992 Name="Release|Win32" 57993 ExcludedFromBuild="true" 57994 > 57995 <Tool 57996 Name="VCCLCompilerTool" 57997 /> 57998 </FileConfiguration> 57999 <FileConfiguration 57943 58000 Name="Debug_Cairo_CFLite|Win32" 57944 58001 ExcludedFromBuild="true" … … 61660 61717 /> 61661 61718 </FileConfiguration> 61662 </File>61663 <File61664 RelativePath="..\bindings\js\JSWorkerContextErrorHandler.cpp"61665 >61666 <FileConfiguration61667 Name="Debug|Win32"61668 ExcludedFromBuild="true"61669 >61670 <Tool61671 Name="VCCLCompilerTool"61672 />61673 </FileConfiguration>61674 <FileConfiguration61675 Name="Release|Win32"61676 ExcludedFromBuild="true"61677 >61678 <Tool61679 Name="VCCLCompilerTool"61680 />61681 </FileConfiguration>61682 <FileConfiguration61683 Name="Debug_Cairo_CFLite|Win32"61684 ExcludedFromBuild="true"61685 >61686 <Tool61687 Name="VCCLCompilerTool"61688 />61689 </FileConfiguration>61690 <FileConfiguration61691 Name="Release_Cairo_CFLite|Win32"61692 ExcludedFromBuild="true"61693 >61694 <Tool61695 Name="VCCLCompilerTool"61696 />61697 </FileConfiguration>61698 <FileConfiguration61699 Name="Debug_All|Win32"61700 ExcludedFromBuild="true"61701 >61702 <Tool61703 Name="VCCLCompilerTool"61704 />61705 </FileConfiguration>61706 <FileConfiguration61707 Name="Release_LTCG|Win32"61708 ExcludedFromBuild="true"61709 >61710 <Tool61711 Name="VCCLCompilerTool"61712 />61713 </FileConfiguration>61714 </File>61715 <File61716 RelativePath="..\bindings\js\JSWorkerContextErrorHandler.h"61717 >61718 61719 </File> 61719 61720 <File -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r73886 r73914 5559 5559 F39BE95B12673BF400E0A674 /* ScriptArguments.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F39BE95912673BF400E0A674 /* ScriptArguments.cpp */; }; 5560 5560 F39BE95C12673BF400E0A674 /* ScriptArguments.h in Headers */ = {isa = PBXBuildFile; fileRef = F39BE95A12673BF400E0A674 /* ScriptArguments.h */; }; 5561 F3D461481161D53200CA0D09 /* JS WorkerContextErrorHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F3D461461161D53200CA0D09 /* JSWorkerContextErrorHandler.cpp */; };5562 F3D461491161D53200CA0D09 /* JS WorkerContextErrorHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = F3D461471161D53200CA0D09 /* JSWorkerContextErrorHandler.h */; };5561 F3D461481161D53200CA0D09 /* JSErrorHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F3D461461161D53200CA0D09 /* JSErrorHandler.cpp */; }; 5562 F3D461491161D53200CA0D09 /* JSErrorHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = F3D461471161D53200CA0D09 /* JSErrorHandler.h */; }; 5563 5563 F4EAF4AE10C742B1009100D3 /* OpenTypeSanitizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F4EAF4AC10C742B1009100D3 /* OpenTypeSanitizer.cpp */; }; 5564 5564 F4EAF4AF10C742B1009100D3 /* OpenTypeSanitizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F4EAF4AD10C742B1009100D3 /* OpenTypeSanitizer.h */; }; … … 11860 11860 F39BE95912673BF400E0A674 /* ScriptArguments.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptArguments.cpp; sourceTree = "<group>"; }; 11861 11861 F39BE95A12673BF400E0A674 /* ScriptArguments.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptArguments.h; sourceTree = "<group>"; }; 11862 F3D461461161D53200CA0D09 /* JS WorkerContextErrorHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWorkerContextErrorHandler.cpp; sourceTree = "<group>"; };11863 F3D461471161D53200CA0D09 /* JS WorkerContextErrorHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWorkerContextErrorHandler.h; sourceTree = "<group>"; };11862 F3D461461161D53200CA0D09 /* JSErrorHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSErrorHandler.cpp; sourceTree = "<group>"; }; 11863 F3D461471161D53200CA0D09 /* JSErrorHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSErrorHandler.h; sourceTree = "<group>"; }; 11864 11864 F4EAF4AC10C742B1009100D3 /* OpenTypeSanitizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OpenTypeSanitizer.cpp; path = opentype/OpenTypeSanitizer.cpp; sourceTree = "<group>"; }; 11865 11865 F4EAF4AD10C742B1009100D3 /* OpenTypeSanitizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OpenTypeSanitizer.h; path = opentype/OpenTypeSanitizer.h; sourceTree = "<group>"; }; … … 17457 17457 BC53DAC611433064000D817E /* JSDOMWrapper.cpp */, 17458 17458 65E0E9431133C89F00B4CB10 /* JSDOMWrapper.h */, 17459 F3D461461161D53200CA0D09 /* JSErrorHandler.cpp */, 17460 F3D461471161D53200CA0D09 /* JSErrorHandler.h */, 17459 17461 BC60901E0E91B8EC000C68B5 /* JSEventTarget.cpp */, 17460 17462 BC60901D0E91B8EC000C68B5 /* JSEventTarget.h */, … … 17468 17470 E1C36D320EB0A094007410BC /* JSWorkerContextBase.cpp */, 17469 17471 E1C36D330EB0A094007410BC /* JSWorkerContextBase.h */, 17470 F3D461461161D53200CA0D09 /* JSWorkerContextErrorHandler.cpp */,17471 F3D461471161D53200CA0D09 /* JSWorkerContextErrorHandler.h */,17472 17472 BCA378BA0D15F64200B793D6 /* ScheduledAction.cpp */, 17473 17473 BCA378BB0D15F64200B793D6 /* ScheduledAction.h */, … … 21134 21134 E18256900EF2B02D00933242 /* JSWorkerContext.h in Headers */, 21135 21135 E1C36D350EB0A094007410BC /* JSWorkerContextBase.h in Headers */, 21136 F3D461491161D53200CA0D09 /* JS WorkerContextErrorHandler.h in Headers */,21136 F3D461491161D53200CA0D09 /* JSErrorHandler.h in Headers */, 21137 21137 E1C362EF0EAF2AA9007410BC /* JSWorkerLocation.h in Headers */, 21138 21138 E1271A580EEECDE400F61213 /* JSWorkerNavigator.h in Headers */, … … 23954 23954 E1C36D340EB0A094007410BC /* JSWorkerContextBase.cpp in Sources */, 23955 23955 E18258AC0EF3CD7000933242 /* JSWorkerContextCustom.cpp in Sources */, 23956 F3D461481161D53200CA0D09 /* JS WorkerContextErrorHandler.cpp in Sources */,23956 F3D461481161D53200CA0D09 /* JSErrorHandler.cpp in Sources */, 23957 23957 E1CA5CBC0E8CDCAF00E8EF90 /* JSWorkerCustom.cpp in Sources */, 23958 23958 E1C362F00EAF2AA9007410BC /* JSWorkerLocation.cpp in Sources */, -
trunk/WebCore/bindings/js/JSBindingsAllInOne.cpp
r72590 r73914 73 73 #include "JSDocumentCustom.cpp" 74 74 #include "JSElementCustom.cpp" 75 #include "JSErrorHandler.cpp" 75 76 #include "JSEventCustom.cpp" 76 77 #include "JSEventListener.cpp" … … 142 143 #include "JSWorkerContextBase.cpp" 143 144 #include "JSWorkerContextCustom.cpp" 144 #include "JSWorkerContextErrorHandler.cpp"145 145 #include "JSWorkerCustom.cpp" 146 146 #include "JSXMLHttpRequestCustom.cpp" -
trunk/WebCore/bindings/js/JSDOMBinding.cpp
r73647 r73914 56 56 #include "RangeException.h" 57 57 #include "ScriptCachedFrameData.h" 58 #include "ScriptCallStack.h" 58 59 #include "ScriptController.h" 59 60 #include "Settings.h" … … 599 600 return; 600 601 601 scriptExecutionContext->reportException(ustringToString(errorMessage), lineNumber, ustringToString(exceptionSourceURL) );602 scriptExecutionContext->reportException(ustringToString(errorMessage), lineNumber, ustringToString(exceptionSourceURL), 0); 602 603 } 603 604 -
trunk/WebCore/bindings/js/JSErrorHandler.cpp
r73913 r73914 31 31 #include "config.h" 32 32 33 #if ENABLE(WORKERS) 34 35 #include "JSWorkerContextErrorHandler.h" 33 #include "JSErrorHandler.h" 36 34 37 35 #include "ErrorEvent.h" … … 44 42 namespace WebCore { 45 43 46 JS WorkerContextErrorHandler::JSWorkerContextErrorHandler(JSObject* function, JSObject* wrapper, bool isAttribute, DOMWrapperWorld* isolatedWorld)44 JSErrorHandler::JSErrorHandler(JSObject* function, JSObject* wrapper, bool isAttribute, DOMWrapperWorld* isolatedWorld) 47 45 : JSEventListener(function, wrapper, isAttribute, isolatedWorld) 48 46 { 49 47 } 50 48 51 JS WorkerContextErrorHandler::~JSWorkerContextErrorHandler()49 JSErrorHandler::~JSErrorHandler() 52 50 { 53 51 } 54 52 55 void JS WorkerContextErrorHandler::handleEvent(ScriptExecutionContext* scriptExecutionContext, Event* event)53 void JSErrorHandler::handleEvent(ScriptExecutionContext* scriptExecutionContext, Event* event) 56 54 { 57 55 ASSERT(scriptExecutionContext); 58 56 if (!scriptExecutionContext) 59 57 return; 58 59 ASSERT(event->isErrorEvent()); 60 ErrorEvent* errorEvent = static_cast<ErrorEvent*>(event); 60 61 61 62 JSLock lock(SilenceAssertionsOnly); … … 75 76 76 77 if (callType != CallTypeNone) { 77 78 ref(); 78 RefPtr<JSErrorHandler> protectedctor(this); 79 79 80 80 Event* savedEvent = globalObject->currentEvent(); 81 81 globalObject->setCurrentEvent(event); 82 83 ASSERT(event->isErrorEvent());84 ErrorEvent* errorEvent = static_cast<ErrorEvent*>(event);85 82 86 83 MarkedArgumentBuffer args; … … 107 104 event->preventDefault(); 108 105 } 109 110 deref();111 106 } 112 107 } 113 108 114 109 } // namespace WebCore 115 116 #endif // ENABLE(WORKERS) -
trunk/WebCore/bindings/js/JSErrorHandler.h
r73913 r73914 29 29 */ 30 30 31 #ifndef JS WorkerContextErrorHandler_h32 #define JS WorkerContextErrorHandler_h31 #ifndef JSErrorHandler_h 32 #define JSErrorHandler_h 33 33 34 34 #include "JSEventListener.h" … … 36 36 namespace WebCore { 37 37 38 class JS WorkerContextErrorHandler : public JSEventListener {38 class JSErrorHandler : public JSEventListener { 39 39 public: 40 static PassRefPtr<JS WorkerContextErrorHandler> create(JSC::JSObject* listener, JSC::JSObject* wrapper, bool isAttribute, DOMWrapperWorld* isolatedWorld)40 static PassRefPtr<JSErrorHandler> create(JSC::JSObject* listener, JSC::JSObject* wrapper, bool isAttribute, DOMWrapperWorld* isolatedWorld) 41 41 { 42 return adoptRef(new JS WorkerContextErrorHandler(listener, wrapper, isAttribute, isolatedWorld));42 return adoptRef(new JSErrorHandler(listener, wrapper, isAttribute, isolatedWorld)); 43 43 } 44 44 45 virtual ~JS WorkerContextErrorHandler();45 virtual ~JSErrorHandler(); 46 46 47 47 private: 48 JS WorkerContextErrorHandler(JSC::JSObject* function, JSC::JSObject* wrapper, bool isAttribute, DOMWrapperWorld* isolatedWorld);48 JSErrorHandler(JSC::JSObject* function, JSC::JSObject* wrapper, bool isAttribute, DOMWrapperWorld* isolatedWorld); 49 49 virtual void handleEvent(ScriptExecutionContext*, Event*); 50 50 }; … … 52 52 // Creates a JS EventListener for "onerror" event handler in worker context. It has custom implementation because 53 53 // unlike other event listeners it accepts three parameters. 54 inline PassRefPtr<JS WorkerContextErrorHandler> createJSWorkerContextErrorHandler(JSC::ExecState* exec, JSC::JSValue listener, JSC::JSObject* wrapper)54 inline PassRefPtr<JSErrorHandler> createJSErrorHandler(JSC::ExecState* exec, JSC::JSValue listener, JSC::JSObject* wrapper) 55 55 { 56 56 if (!listener.isObject()) 57 57 return 0; 58 58 59 return JS WorkerContextErrorHandler::create(asObject(listener), wrapper, true, currentWorld(exec));59 return JSErrorHandler::create(asObject(listener), wrapper, true, currentWorld(exec)); 60 60 } 61 61 62 62 } // namespace WebCore 63 63 64 #endif // JS WorkerContextErrorHandler_h64 #endif // JSErrorHandler_h -
trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm
r73564 r73914 1710 1710 } 1711 1711 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(static_cast<$className*>(thisObject)->impl());\n"); 1712 if ( $interfaceName eq "WorkerContext"and $name eq "onerror") {1713 $implIncludes{"JS WorkerContextErrorHandler.h"} = 1;1714 push(@implContent, " imp->set$implSetterFunctionName(createJS WorkerContextErrorHandler(exec, value, thisObject));\n");1712 if ((($interfaceName eq "DOMWindow") or ($interfaceName eq "WorkerContext")) and $name eq "onerror") { 1713 $implIncludes{"JSErrorHandler.h"} = 1; 1714 push(@implContent, " imp->set$implSetterFunctionName(createJSErrorHandler(exec, value, thisObject));\n"); 1715 1715 } else { 1716 1716 push(@implContent, GenerateAttributeEventListenerCall($className, $implSetterFunctionName, $windowEventListener)); -
trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm
r73266 r73914 1002 1002 $implIncludes{"V8WorkerContextErrorHandler.h"} = 1; 1003 1003 push(@implContentDecls, " imp->set$implSetterFunctionName(V8EventListenerList::findOrCreateWrapper<V8WorkerContextErrorHandler>(value, true)"); 1004 } elsif ($interfaceName eq "DOMWindow" and $attribute->signature->name eq "onerror") { 1005 $implIncludes{"V8EventListenerList.h"} = 1; 1006 $implIncludes{"V8WindowErrorHandler.h"} = 1; 1007 push(@implContentDecls, " imp->set$implSetterFunctionName(V8EventListenerList::findOrCreateWrapper<V8WindowErrorHandler>(value, true)"); 1004 1008 } else { 1005 1009 push(@implContentDecls, " imp->set$implSetterFunctionName(V8DOMWrapper::getEventListener(value, true, ListenerFindOrCreate)"); -
trunk/WebCore/bindings/v8/V8ConsoleMessage.cpp
r73366 r73914 55 55 void V8ConsoleMessage::dispatchNow(Page* page) 56 56 { 57 dispatchNow(page, 0); 57 ASSERT(page); 58 59 // Process any delayed messages to make sure that messages 60 // appear in the right order in the console. 61 processDelayed(); 62 63 Console* console = page->mainFrame()->domWindow()->console(); 64 console->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, m_string, m_lineNumber, m_sourceID); 58 65 } 59 66 … … 106 113 if (!frame) 107 114 return; 108 Page* page = frame->page();109 if (! page)115 Document* document = frame->document(); 116 if (!document) 110 117 return; 111 118 … … 123 130 bool useURL = resourceName.IsEmpty() || !resourceName->IsString(); 124 131 String resourceNameString = useURL ? frame->document()->url() : toWebCoreString(resourceName); 125 V8ConsoleMessage consoleMessage(errorMessage, resourceNameString, message->GetLineNumber()); 126 consoleMessage.dispatchNow(page, callStack); 127 } 128 129 void V8ConsoleMessage::dispatchNow(Page* page, PassRefPtr<ScriptCallStack> callStack) 130 { 131 ASSERT(page); 132 133 // Process any delayed messages to make sure that messages 134 // appear in the right order in the console. 135 processDelayed(); 136 137 Console* console = page->mainFrame()->domWindow()->console(); 138 MessageType messageType = callStack ? UncaughtExceptionMessageType : LogMessageType; 139 console->addMessage(JSMessageSource, messageType, ErrorMessageLevel, m_string, m_lineNumber, m_sourceID, callStack); 132 document->reportException(errorMessage, message->GetLineNumber(), resourceNameString, callStack); 140 133 } 141 134 -
trunk/WebCore/bindings/v8/V8ConsoleMessage.h
r72895 r73914 83 83 const unsigned m_lineNumber; 84 84 85 void dispatchNow(Page*, PassRefPtr<ScriptCallStack>);86 87 85 // All delayed messages are stored in this vector. If the vector 88 86 // is 0, there are no delayed messages. -
trunk/WebCore/bindings/v8/V8WindowErrorHandler.cpp
-
Property
svn:executable
set to
*
r73913 r73914 29 29 */ 30 30 31 #ifndef JSWorkerContextErrorHandler_h 32 #define JSWorkerContextErrorHandler_h 31 #include "config.h" 33 32 34 #include "JSEventListener.h" 33 #include "V8WindowErrorHandler.h" 34 35 #include "ErrorEvent.h" 36 #include "V8Binding.h" 35 37 36 38 namespace WebCore { 37 39 38 class JSWorkerContextErrorHandler : public JSEventListener { 39 public: 40 static PassRefPtr<JSWorkerContextErrorHandler> create(JSC::JSObject* listener, JSC::JSObject* wrapper, bool isAttribute, DOMWrapperWorld* isolatedWorld) 41 { 42 return adoptRef(new JSWorkerContextErrorHandler(listener, wrapper, isAttribute, isolatedWorld)); 40 V8WindowErrorHandler::V8WindowErrorHandler(v8::Local<v8::Object> listener, bool isInline, const WorldContextHandle& worldContext) 41 : V8EventListener(listener, isInline, worldContext) 42 { 43 } 44 45 v8::Local<v8::Value> V8WindowErrorHandler::callListenerFunction(ScriptExecutionContext* context, v8::Handle<v8::Value> jsEvent, Event* event) 46 { 47 ASSERT(event->isErrorEvent()); 48 ErrorEvent* errorEvent = static_cast<ErrorEvent*>(event); 49 v8::Local<v8::Object> listener = getListenerObject(context); 50 v8::Local<v8::Value> returnValue; 51 if (!listener.IsEmpty() && listener->IsFunction()) { 52 v8::Local<v8::Function> callFunction = v8::Local<v8::Function>::Cast(listener); 53 v8::Local<v8::Object> thisValue = v8::Context::GetCurrent()->Global(); 54 v8::Handle<v8::Value> parameters[3] = { v8String(errorEvent->message()), v8String(errorEvent->filename()), v8::Integer::New(errorEvent->lineno()) }; 55 returnValue = callFunction->Call(thisValue, 3, parameters); 56 if (!returnValue.IsEmpty() && returnValue->IsBoolean() && !returnValue->BooleanValue()) 57 event->preventDefault(); 43 58 } 44 45 virtual ~JSWorkerContextErrorHandler(); 46 47 private: 48 JSWorkerContextErrorHandler(JSC::JSObject* function, JSC::JSObject* wrapper, bool isAttribute, DOMWrapperWorld* isolatedWorld); 49 virtual void handleEvent(ScriptExecutionContext*, Event*); 50 }; 51 52 // Creates a JS EventListener for "onerror" event handler in worker context. It has custom implementation because 53 // unlike other event listeners it accepts three parameters. 54 inline PassRefPtr<JSWorkerContextErrorHandler> createJSWorkerContextErrorHandler(JSC::ExecState* exec, JSC::JSValue listener, JSC::JSObject* wrapper) 55 { 56 if (!listener.isObject()) 57 return 0; 58 59 return JSWorkerContextErrorHandler::create(asObject(listener), wrapper, true, currentWorld(exec)); 59 return returnValue; 60 60 } 61 61 62 62 } // namespace WebCore 63 64 #endif // JSWorkerContextErrorHandler_h -
Property
svn:executable
set to
-
trunk/WebCore/bindings/v8/V8WindowErrorHandler.h
-
Property
svn:executable
set to
*
r73913 r73914 29 29 */ 30 30 31 #ifndef JSWorkerContextErrorHandler_h32 #define JSWorkerContextErrorHandler_h31 #ifndef V8WindowErrorHandler_h 32 #define V8WindowErrorHandler_h 33 33 34 #include "JSEventListener.h" 34 #include "V8CustomEventListener.h" 35 #include <v8.h> 36 #include <wtf/PassRefPtr.h> 35 37 36 38 namespace WebCore { 37 39 38 class JSWorkerContextErrorHandler : public JSEventListener {40 class V8WindowErrorHandler : public V8EventListener { 39 41 public: 40 static PassRefPtr< JSWorkerContextErrorHandler> create(JSC::JSObject* listener, JSC::JSObject* wrapper, bool isAttribute, DOMWrapperWorld* isolatedWorld)42 static PassRefPtr<V8WindowErrorHandler> create(v8::Local<v8::Object> listener, bool isInline, const WorldContextHandle& worldContext) 41 43 { 42 return adoptRef(new JSWorkerContextErrorHandler(listener, wrapper, isAttribute, isolatedWorld));44 return adoptRef(new V8WindowErrorHandler(listener, isInline, worldContext)); 43 45 } 44 46 45 virtual ~JSWorkerContextErrorHandler(); 47 private: 48 V8WindowErrorHandler(v8::Local<v8::Object> listener, bool isInline, const WorldContextHandle& worldContext); 46 49 47 private: 48 JSWorkerContextErrorHandler(JSC::JSObject* function, JSC::JSObject* wrapper, bool isAttribute, DOMWrapperWorld* isolatedWorld); 49 virtual void handleEvent(ScriptExecutionContext*, Event*); 50 virtual v8::Local<v8::Value> callListenerFunction(ScriptExecutionContext*, v8::Handle<v8::Value> jsEvent, Event*); 50 51 }; 51 52 // Creates a JS EventListener for "onerror" event handler in worker context. It has custom implementation because53 // unlike other event listeners it accepts three parameters.54 inline PassRefPtr<JSWorkerContextErrorHandler> createJSWorkerContextErrorHandler(JSC::ExecState* exec, JSC::JSValue listener, JSC::JSObject* wrapper)55 {56 if (!listener.isObject())57 return 0;58 59 return JSWorkerContextErrorHandler::create(asObject(listener), wrapper, true, currentWorld(exec));60 }61 52 62 53 } // namespace WebCore 63 54 64 #endif // JSWorkerContextErrorHandler_h55 #endif // V8WindowErrorHandler_h -
Property
svn:executable
set to
-
trunk/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
r71735 r73914 38 38 #include "DedicatedWorkerContext.h" 39 39 #include "Event.h" 40 #include "ScriptCallStack.h" 40 41 #include "SharedWorker.h" 41 42 #include "SharedWorkerContext.h" … … 73 74 int lineNumber = message->GetLineNumber(); 74 75 String sourceURL = toWebCoreString(message->GetScriptResourceName()); 75 context->reportException(errorMessage, lineNumber, sourceURL );76 context->reportException(errorMessage, lineNumber, sourceURL, 0); 76 77 } 77 78 -
trunk/WebCore/bindings/v8/WorkerScriptController.cpp
r71735 r73914 35 35 #include "WorkerScriptController.h" 36 36 37 #include <v8.h>38 37 #include "DOMTimer.h" 38 #include "ScriptCallStack.h" 39 39 #include "ScriptSourceCode.h" 40 40 #include "ScriptValue.h" 41 #include "DOMTimer.h"42 41 #include "V8DOMMap.h" 43 42 #include "V8Proxy.h" … … 47 46 #include "WorkerObjectProxy.h" 48 47 #include "WorkerThread.h" 48 #include <v8.h> 49 49 50 50 namespace WebCore { … … 81 81 *exception = state.exception; 82 82 else 83 m_workerContext->reportException(state.errorMessage, state.lineNumber, state.sourceURL );83 m_workerContext->reportException(state.errorMessage, state.lineNumber, state.sourceURL, 0); 84 84 } 85 85 -
trunk/WebCore/dom/Document.cpp
r73620 r73914 119 119 #include "RenderView.h" 120 120 #include "RenderWidget.h" 121 #include "ScriptCallStack.h" 121 122 #include "ScriptController.h" 122 123 #include "ScriptElement.h" … … 2270 2271 { 2271 2272 return completeURL(url); 2273 } 2274 2275 EventTarget* Document::errorEventTarget() 2276 { 2277 return domWindow(); 2278 } 2279 2280 void Document::logExceptionToConsole(const String& errorMessage, int lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack> callStack) 2281 { 2282 MessageType messageType = callStack ? UncaughtExceptionMessageType : LogMessageType; 2283 addMessage(JSMessageSource, messageType, ErrorMessageLevel, errorMessage, lineNumber, sourceURL, callStack); 2272 2284 } 2273 2285 … … 4661 4673 } 4662 4674 4663 void Document::reportException(const String& errorMessage, int lineNumber, const String& sourceURL) 4664 { 4665 addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, errorMessage, lineNumber, sourceURL); 4666 } 4667 4668 void Document::addMessage(MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL) 4675 void Document::addMessage(MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack> callStack) 4669 4676 { 4670 4677 if (DOMWindow* window = domWindow()) 4671 window->console()->addMessage(source, type, level, message, lineNumber, sourceURL );4678 window->console()->addMessage(source, type, level, message, lineNumber, sourceURL, callStack); 4672 4679 } 4673 4680 -
trunk/WebCore/dom/Document.h
r73559 r73914 931 931 void parseDNSPrefetchControlHeader(const String&); 932 932 933 virtual void reportException(const String& errorMessage, int lineNumber, const String& sourceURL); 934 virtual void addMessage(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL); 933 virtual void addMessage(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>); 935 934 virtual void postTask(PassOwnPtr<Task>); // Executes the task on context's thread asynchronously. 936 935 … … 1116 1115 virtual const KURL& virtualURL() const; // Same as url(), but needed for ScriptExecutionContext to implement it without a performance loss for direct calls. 1117 1116 virtual KURL virtualCompleteURL(const String&) const; // Same as completeURL() for the same reason as above. 1117 1118 virtual EventTarget* errorEventTarget(); 1119 virtual void logExceptionToConsole(const String& errorMessage, int lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>); 1118 1120 1119 1121 void initDNSPrefetch(); -
trunk/WebCore/dom/ScriptExecutionContext.cpp
r67734 r73914 34 34 #include "DatabaseTask.h" 35 35 #include "DatabaseThread.h" 36 #include "ErrorEvent.h" 37 #include "EventListener.h" 38 #include "EventTarget.h" 36 39 #include "FileThread.h" 37 40 #include "MessagePort.h" 41 #include "ScriptCallStack.h" 38 42 #include "SecurityOrigin.h" 39 43 #include "ThreadableBlobRegistry.h" … … 42 46 #include <wtf/MainThread.h> 43 47 #include <wtf/PassRefPtr.h> 48 #include <wtf/Vector.h> 44 49 45 50 #if USE(JSC) … … 62 67 }; 63 68 69 class ScriptExecutionContext::PendingException : public Noncopyable { 70 public: 71 PendingException(const String& errorMessage, int lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack> callStack) 72 : m_errorMessage(errorMessage) 73 , m_lineNumber(lineNumber) 74 , m_sourceURL(sourceURL) 75 , m_callStack(callStack) 76 { 77 } 78 String m_errorMessage; 79 int m_lineNumber; 80 String m_sourceURL; 81 RefPtr<ScriptCallStack> m_callStack; 82 }; 83 64 84 ScriptExecutionContext::ScriptExecutionContext() 65 85 #if ENABLE(DATABASE) 66 86 : m_hasOpenDatabases(false) 67 87 #endif 88 , m_inDispatchErrorEvent(false) 68 89 { 69 90 } … … 244 265 } 245 266 267 void ScriptExecutionContext::reportException(const String& errorMessage, int lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack> callStack) 268 { 269 if (m_inDispatchErrorEvent) { 270 if (!m_pendingExceptions) 271 m_pendingExceptions = adoptPtr(new Vector<OwnPtr<PendingException> >()); 272 m_pendingExceptions->append(adoptPtr(new PendingException(errorMessage, lineNumber, sourceURL, callStack))); 273 return; 274 } 275 276 // First report the original exception and only then all the nested ones. 277 if (!dispatchErrorEvent(errorMessage, lineNumber, sourceURL)) 278 logExceptionToConsole(errorMessage, lineNumber, sourceURL, callStack); 279 280 if (!m_pendingExceptions) 281 return; 282 283 for (size_t i = 0; i < m_pendingExceptions->size(); i++) { 284 PendingException* e = m_pendingExceptions->at(i).get(); 285 logExceptionToConsole(e->m_errorMessage, e->m_lineNumber, e->m_sourceURL, e->m_callStack); 286 } 287 m_pendingExceptions.clear(); 288 } 289 290 bool ScriptExecutionContext::dispatchErrorEvent(const String& errorMessage, int lineNumber, const String& sourceURL) 291 { 292 EventTarget* target = errorEventTarget(); 293 if (!target) 294 return false; 295 296 ASSERT(!m_inDispatchErrorEvent); 297 m_inDispatchErrorEvent = true; 298 RefPtr<ErrorEvent> errorEvent = ErrorEvent::create(errorMessage, sourceURL, lineNumber); 299 target->dispatchEvent(errorEvent); 300 m_inDispatchErrorEvent = false; 301 return errorEvent->defaultPrevented(); 302 } 303 246 304 void ScriptExecutionContext::addTimeout(int timeoutId, DOMTimer* timer) 247 305 { -
trunk/WebCore/dom/ScriptExecutionContext.h
r69688 r73914 34 34 #include <wtf/HashMap.h> 35 35 #include <wtf/HashSet.h> 36 #include <wtf/OwnPtr.h> 36 37 #include <wtf/PassOwnPtr.h> 37 38 #include <wtf/PassRefPtr.h> … … 53 54 #endif 54 55 class DOMTimer; 56 class EventListener; 57 class EventTarget; 55 58 #if ENABLE(BLOB) || ENABLE(FILE_SYSTEM) 56 59 class FileThread; … … 58 61 class MessagePort; 59 62 class SecurityOrigin; 63 class ScriptCallStack; 60 64 #if ENABLE(INSPECTOR) 61 65 class InspectorController; … … 92 96 #endif 93 97 94 v irtual void reportException(const String& errorMessage, int lineNumber, const String& sourceURL) = 0;95 virtual void addMessage(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL ) = 0;98 void reportException(const String& errorMessage, int lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>); 99 virtual void addMessage(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>) = 0; 96 100 97 101 // Active objects are not garbage collected even if inaccessible, e.g. because their activity may result in callbacks being invoked. … … 155 159 virtual KURL virtualCompleteURL(const String&) const = 0; 156 160 161 virtual EventTarget* errorEventTarget() = 0; 162 virtual void logExceptionToConsole(const String& errorMessage, int lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>) = 0; 163 bool dispatchErrorEvent(const String& errorMessage, int lineNumber, const String& sourceURL); 164 157 165 void closeMessagePorts(); 158 166 … … 180 188 RefPtr<FileThread> m_fileThread; 181 189 #endif 190 bool m_inDispatchErrorEvent; 191 class PendingException; 192 OwnPtr<Vector<OwnPtr<PendingException> > > m_pendingExceptions; 182 193 }; 183 194 -
trunk/WebCore/websockets/WebSocket.cpp
r69798 r73914 42 42 #include "Logging.h" 43 43 #include "MessageEvent.h" 44 #include "ScriptCallStack.h" 44 45 #include "ScriptExecutionContext.h" 45 46 #include "ThreadableWebSocketChannel.h" … … 117 118 118 119 if (!m_url.isValid()) { 119 scriptExecutionContext()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Invalid url for WebSocket " + url.string(), 0, scriptExecutionContext()->securityOrigin()->toString() );120 scriptExecutionContext()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Invalid url for WebSocket " + url.string(), 0, scriptExecutionContext()->securityOrigin()->toString(), 0); 120 121 m_state = CLOSED; 121 122 ec = SYNTAX_ERR; … … 124 125 125 126 if (!m_url.protocolIs("ws") && !m_url.protocolIs("wss")) { 126 scriptExecutionContext()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Wrong url scheme for WebSocket " + url.string(), 0, scriptExecutionContext()->securityOrigin()->toString() );127 scriptExecutionContext()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Wrong url scheme for WebSocket " + url.string(), 0, scriptExecutionContext()->securityOrigin()->toString(), 0); 127 128 m_state = CLOSED; 128 129 ec = SYNTAX_ERR; … … 130 131 } 131 132 if (m_url.hasFragmentIdentifier()) { 132 scriptExecutionContext()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "URL has fragment component " + url.string(), 0, scriptExecutionContext()->securityOrigin()->toString() );133 scriptExecutionContext()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "URL has fragment component " + url.string(), 0, scriptExecutionContext()->securityOrigin()->toString(), 0); 133 134 m_state = CLOSED; 134 135 ec = SYNTAX_ERR; … … 136 137 } 137 138 if (!isValidProtocolString(m_protocol)) { 138 scriptExecutionContext()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Wrong protocol for WebSocket '" + encodeProtocolString(m_protocol) + "'", 0, scriptExecutionContext()->securityOrigin()->toString() );139 scriptExecutionContext()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Wrong protocol for WebSocket '" + encodeProtocolString(m_protocol) + "'", 0, scriptExecutionContext()->securityOrigin()->toString(), 0); 139 140 m_state = CLOSED; 140 141 ec = SYNTAX_ERR; … … 142 143 } 143 144 if (!portAllowed(url)) { 144 scriptExecutionContext()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, makeString("WebSocket port ", String::number(url.port()), " blocked"), 0, scriptExecutionContext()->securityOrigin()->toString() );145 scriptExecutionContext()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, makeString("WebSocket port ", String::number(url.port()), " blocked"), 0, scriptExecutionContext()->securityOrigin()->toString(), 0); 145 146 m_state = CLOSED; 146 147 ec = SECURITY_ERR; -
trunk/WebCore/websockets/WebSocketChannel.cpp
r70216 r73914 42 42 #include "PlatformString.h" 43 43 #include "ProgressTracker.h" 44 #include "ScriptCallStack.h" 44 45 #include "ScriptExecutionContext.h" 45 46 #include "SocketStreamError.h" … … 156 157 CString handshakeMessage = m_handshake.clientHandshakeMessage(); 157 158 if (!handle->send(handshakeMessage.data(), handshakeMessage.length())) { 158 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error sending handshake message.", 0, m_handshake.clientOrigin() );159 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error sending handshake message.", 0, m_handshake.clientOrigin(), 0); 159 160 handle->close(); 160 161 } … … 240 241 return true; 241 242 } 242 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, makeString("WebSocket frame (at ", String::number(static_cast<unsigned long>(newBufferSize)), " bytes) is too long."), 0, m_handshake.clientOrigin() );243 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, makeString("WebSocket frame (at ", String::number(static_cast<unsigned long>(newBufferSize)), " bytes) is too long."), 0, m_handshake.clientOrigin(), 0); 243 244 return false; 244 245 } -
trunk/WebCore/websockets/WebSocketHandshake.cpp
r69798 r73914 42 42 #include "KURL.h" 43 43 #include "Logging.h" 44 #include "ScriptCallStack.h" 44 45 #include "ScriptExecutionContext.h" 45 46 #include "SecurityOrigin.h" … … 320 321 if (statusCode != 101) { 321 322 m_mode = Failed; 322 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, makeString("Unexpected response code: ", String::number(statusCode)), 0, clientOrigin() );323 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, makeString("Unexpected response code: ", String::number(statusCode)), 0, clientOrigin(), 0); 323 324 return len; 324 325 } … … 450 451 const char* end = p + 1; 451 452 if (end - header > INT_MAX) { 452 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Status line is too long: " + trimConsoleMessage(header, maxConsoleMessageSize + 1), 0, clientOrigin() );453 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Status line is too long: " + trimConsoleMessage(header, maxConsoleMessageSize + 1), 0, clientOrigin(), 0); 453 454 return INT_MAX; 454 455 } … … 456 457 457 458 if (!space1 || !space2) { 458 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "No response code found: " + trimConsoleMessage(header, lineLength - 1), 0, clientOrigin() );459 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "No response code found: " + trimConsoleMessage(header, lineLength - 1), 0, clientOrigin(), 0); 459 460 return lineLength; 460 461 } … … 462 463 // The line must end with "\r\n". 463 464 if (*(end - 2) != '\r') { 464 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Status line does not end with CRLF", 0, clientOrigin() );465 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Status line does not end with CRLF", 0, clientOrigin(), 0); 465 466 return lineLength; 466 467 } … … 471 472 for (int i = 0; i < 3; ++i) 472 473 if (statusCodeString[i] < '0' || statusCodeString[i] > '9') { 473 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Invalid status code: " + statusCodeString, 0, clientOrigin() );474 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Invalid status code: " + statusCodeString, 0, clientOrigin(), 0); 474 475 return lineLength; 475 476 } … … 499 500 if (p + 1 < end && *(p + 1) == '\n') 500 501 return p + 2; 501 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "CR doesn't follow LF at " + trimConsoleMessage(p, end - p), 0, clientOrigin() );502 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "CR doesn't follow LF at " + trimConsoleMessage(p, end - p), 0, clientOrigin(), 0); 502 503 return 0; 503 504 } 504 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Unexpected CR in name at " + trimConsoleMessage(name.data(), name.size()), 0, clientOrigin() );505 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Unexpected CR in name at " + trimConsoleMessage(name.data(), name.size()), 0, clientOrigin(), 0); 505 506 return 0; 506 507 case '\n': 507 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Unexpected LF in name at " + trimConsoleMessage(name.data(), name.size()), 0, clientOrigin() );508 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Unexpected LF in name at " + trimConsoleMessage(name.data(), name.size()), 0, clientOrigin(), 0); 508 509 return 0; 509 510 case ':': … … 526 527 break; 527 528 case '\n': 528 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Unexpected LF in value at " + trimConsoleMessage(value.data(), value.size()), 0, clientOrigin() );529 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Unexpected LF in value at " + trimConsoleMessage(value.data(), value.size()), 0, clientOrigin(), 0); 529 530 return 0; 530 531 default: … … 537 538 } 538 539 if (p >= end || *p != '\n') { 539 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "CR doesn't follow LF after value at " + trimConsoleMessage(p, end - p), 0, clientOrigin() );540 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "CR doesn't follow LF after value at " + trimConsoleMessage(p, end - p), 0, clientOrigin(), 0); 540 541 return 0; 541 542 } … … 543 544 String valueStr = String::fromUTF8(value.data(), value.size()); 544 545 if (nameStr.isNull()) { 545 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "invalid UTF-8 sequence in header name", 0, clientOrigin() );546 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "invalid UTF-8 sequence in header name", 0, clientOrigin(), 0); 546 547 return 0; 547 548 } 548 549 if (valueStr.isNull()) { 549 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "invalid UTF-8 sequence in header value", 0, clientOrigin() );550 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "invalid UTF-8 sequence in header value", 0, clientOrigin(), 0); 550 551 return 0; 551 552 } … … 571 572 { 572 573 if (m_wsOrigin.isNull()) { 573 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: 'sec-websocket-origin' header is missing", 0, clientOrigin() );574 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: 'sec-websocket-origin' header is missing", 0, clientOrigin(), 0); 574 575 return false; 575 576 } 576 577 if (m_wsLocation.isNull()) { 577 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: 'sec-websocket-location' header is missing", 0, clientOrigin() );578 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: 'sec-websocket-location' header is missing", 0, clientOrigin(), 0); 578 579 return false; 579 580 } 580 581 581 582 if (clientOrigin() != m_wsOrigin) { 582 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: origin mismatch: " + clientOrigin() + " != " + m_wsOrigin, 0, clientOrigin() );583 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: origin mismatch: " + clientOrigin() + " != " + m_wsOrigin, 0, clientOrigin(), 0); 583 584 return false; 584 585 } 585 586 if (clientLocation() != m_wsLocation) { 586 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: location mismatch: " + clientLocation() + " != " + m_wsLocation, 0, clientOrigin() );587 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: location mismatch: " + clientLocation() + " != " + m_wsLocation, 0, clientOrigin(), 0); 587 588 return false; 588 589 } 589 590 if (!m_clientProtocol.isEmpty() && m_clientProtocol != m_wsProtocol) { 590 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: protocol mismatch: " + m_clientProtocol + " != " + m_wsProtocol, 0, clientOrigin() );591 m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error during WebSocket handshake: protocol mismatch: " + m_clientProtocol + " != " + m_wsProtocol, 0, clientOrigin(), 0); 591 592 return false; 592 593 } -
trunk/WebCore/workers/DefaultSharedWorkerRepository.cpp
r62551 r73914 43 43 #include "NotImplemented.h" 44 44 #include "PlatformString.h" 45 #include "ScriptCallStack.h" 45 46 #include "SecurityOrigin.h" 46 47 #include "SecurityOriginHash.h" … … 156 157 static void postExceptionTask(ScriptExecutionContext* context, const String& errorMessage, int lineNumber, const String& sourceURL) 157 158 { 158 context->reportException(errorMessage, lineNumber, sourceURL );159 context->reportException(errorMessage, lineNumber, sourceURL, 0); 159 160 } 160 161 … … 168 169 static void postConsoleMessageTask(ScriptExecutionContext* document, MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL) 169 170 { 170 document->addMessage(source, type, level, message, lineNumber, sourceURL );171 document->addMessage(source, type, level, message, lineNumber, sourceURL, 0); 171 172 } 172 173 -
trunk/WebCore/workers/WorkerContext.cpp
r70438 r73914 47 47 #include "MessagePort.h" 48 48 #include "NotImplemented.h" 49 #include "ScriptCallStack.h" 49 50 #include "ScriptSourceCode.h" 50 51 #include "ScriptValue.h" … … 103 104 , m_thread(thread) 104 105 , m_closing(false) 105 , m_reportingException(false)106 106 { 107 107 setSecurityOrigin(SecurityOrigin::create(url)); … … 260 260 } 261 261 262 void WorkerContext::reportException(const String& errorMessage, int lineNumber, const String& sourceURL) 263 { 264 bool errorHandled = false; 265 if (!m_reportingException) { 266 if (onerror()) { 267 m_reportingException = true; 268 RefPtr<ErrorEvent> errorEvent(ErrorEvent::create(errorMessage, sourceURL, lineNumber)); 269 onerror()->handleEvent(this, errorEvent.get()); 270 errorHandled = errorEvent->defaultPrevented(); 271 m_reportingException = false; 272 } 273 } 274 if (!errorHandled) 275 thread()->workerReportingProxy().postExceptionToWorkerObject(errorMessage, lineNumber, sourceURL); 276 } 277 278 void WorkerContext::addMessage(MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL) 262 EventTarget* WorkerContext::errorEventTarget() 263 { 264 return this; 265 } 266 267 void WorkerContext::logExceptionToConsole(const String& errorMessage, int lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>) 268 { 269 thread()->workerReportingProxy().postExceptionToWorkerObject(errorMessage, lineNumber, sourceURL); 270 } 271 272 void WorkerContext::addMessage(MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>) 279 273 { 280 274 thread()->workerReportingProxy().postConsoleMessageToWorkerObject(source, type, level, message, lineNumber, sourceURL); -
trunk/WebCore/workers/WorkerContext.h
r70102 r73914 101 101 102 102 // ScriptExecutionContext 103 virtual void reportException(const String& errorMessage, int lineNumber, const String& sourceURL); 104 virtual void addMessage(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL); 103 virtual void addMessage(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>); 105 104 106 105 #if ENABLE(NOTIFICATIONS) … … 175 174 virtual KURL virtualCompleteURL(const String&) const; 176 175 176 virtual EventTarget* errorEventTarget(); 177 virtual void logExceptionToConsole(const String& errorMessage, int lineNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>); 178 177 179 KURL m_url; 178 180 String m_userAgent; … … 188 190 #endif 189 191 bool m_closing; 190 bool m_reportingException;191 192 EventTargetData m_eventTargetData; 192 193 -
trunk/WebCore/workers/WorkerMessagingProxy.cpp
r66850 r73914 41 41 #include "InspectorController.h" 42 42 #include "MessageEvent.h" 43 #include "ScriptCallStack.h" 43 44 #include "ScriptExecutionContext.h" 44 45 #include "Worker.h" … … 132 133 bool errorHandled = !workerObject->dispatchEvent(ErrorEvent::create(m_errorMessage, m_sourceURL, m_lineNumber)); 133 134 if (!errorHandled) 134 context->reportException(m_errorMessage, m_lineNumber, m_sourceURL );135 context->reportException(m_errorMessage, m_lineNumber, m_sourceURL, 0); 135 136 } 136 137 … … 284 285 if (messagingProxy->askedToTerminate()) 285 286 return; 286 context->addMessage(source, type, level, message, lineNumber, sourceURL );287 context->addMessage(source, type, level, message, lineNumber, sourceURL, 0); 287 288 } 288 289 -
trunk/WebCore/xml/XMLHttpRequest.cpp
r72985 r73914 40 40 #include "ResourceError.h" 41 41 #include "ResourceRequest.h" 42 #include "ScriptCallStack.h" 42 43 #include "SecurityOrigin.h" 43 44 #include "Settings.h" … … 812 813 // FIXME: It's not good to report the bad usage without indicating what source line it came from. 813 814 // We should pass additional parameters so we can tell the console where the mistake occurred. 814 context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, message, 1, String() );815 context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, message, 1, String(), 0); 815 816 } 816 817 -
trunk/WebKit/chromium/ChangeLog
r73909 r73914 1 2010-12-13 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 WebCore doesn't fire window.onerror event when uncaught JavaScript exceptions are thrown 6 https://bugs.webkit.org/show_bug.cgi?id=8519 7 8 Uncaught exceptions are propagated to window.onerror hander if one is present. 9 The handler is expected to be a function accepting three arguments: error message, 10 resource url and line number where the exception occured. 11 12 * src/WebWorkerClientImpl.cpp: 13 (WebKit::WebWorkerClientImpl::postExceptionToWorkerObject): 14 (WebKit::WebWorkerClientImpl::postExceptionToWorkerObjectTask): 15 1 16 2010-12-13 Sheriff Bot <webkit.review.bot@gmail.com> 2 17 -
trunk/WebKit/chromium/src/WebWorkerClientImpl.cpp
r62585 r73914 42 42 #include "MessagePort.h" 43 43 #include "MessagePortChannel.h" 44 #include "ScriptCallStack.h" 44 45 #include "ScriptExecutionContext.h" 45 46 #include "Worker.h" … … 248 249 lineNumber)); 249 250 if (unhandled) 250 m_scriptExecutionContext->reportException(errorMessage, lineNumber, sourceURL );251 m_scriptExecutionContext->reportException(errorMessage, lineNumber, sourceURL, 0); 251 252 } 252 253 … … 275 276 static_cast<MessageLevel>(messageLevel), 276 277 String(message), lineNumber, 277 String(sourceURL) );278 String(sourceURL), 0); 278 279 } 279 280 … … 382 383 lineNumber)); 383 384 if (!handled) 384 thisPtr->m_scriptExecutionContext->reportException(errorMessage, 385 lineNumber, 386 sourceURL); 385 thisPtr->m_scriptExecutionContext->reportException(errorMessage, lineNumber, sourceURL, 0); 387 386 } 388 387 … … 399 398 static_cast<MessageType>(messageType), 400 399 static_cast<MessageLevel>(messageLevel), 401 message, lineNumber, 402 sourceURL); 400 message, lineNumber, sourceURL, 0); 403 401 } 404 402
Note: See TracChangeset
for help on using the changeset viewer.