Changeset 279924 in webkit
- Timestamp:
- Jul 14, 2021 3:10:35 PM (3 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r279916 r279924 1 2021-07-14 Mark Lam <mark.lam@apple.com> 2 3 Speculative fix for failed scope.releaseAssertNoException() after calls to JSMap::create(). 4 https://bugs.webkit.org/show_bug.cgi?id=227964 5 rdar://78013960 6 7 Reviewed by Yusuke Suzuki. 8 9 There have been reports of flaky failures on the scope.releaseAssertNoException() 10 after the call to JSMap::create() in JSModuleLoader::finishCreation(). 11 12 The scope.releaseAssertNoException() says that we don't expect the JSMap::create() 13 to ever throw an exception. If the assertion is true, the only way that we can 14 see an exception there is if we're throwing an asynchronous TerminationException. 15 16 Since JSModuleLoader::finishCreation() does not have any long running loops, we can 17 just DeferTerminationForAWhile and let the next exception check site throw the 18 asynchronous TerminationException. We don't want to just use DeferTermination 19 because it will throw the TerminationException right at the end of 20 JSModuleLoader::finishCreation(), and the caller of JSModuleLoader::finishCreation() 21 may be similarly not expecting an exception to be thrown there. 22 23 Also apply the same treatment to AbstractModuleRecord::finishCreation(), and 24 getBackingMap() in WebCore for the same reason. Other than those, other sites that 25 call JSMap::create() already check for exceptions. So, those sites do not need to 26 DeferTerminationForAWhile. 27 28 * runtime/AbstractModuleRecord.cpp: 29 (JSC::AbstractModuleRecord::finishCreation): 30 * runtime/JSModuleLoader.cpp: 31 (JSC::JSModuleLoader::finishCreation): 32 1 33 2021-07-14 Keith Miller <keith_miller@apple.com> 2 34 -
trunk/Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp
r278340 r279924 34 34 #include "JSModuleNamespaceObject.h" 35 35 #include "JSModuleRecord.h" 36 #include "VMTrapsInlines.h" 36 37 #include "WebAssemblyModuleRecord.h" 37 38 … … 51 52 void AbstractModuleRecord::finishCreation(JSGlobalObject* globalObject, VM& vm) 52 53 { 53 DeferTermination deferScope(vm);54 auto scope = DECLARE_ THROW_SCOPE(vm);54 DeferTerminationForAWhile deferScope(vm); 55 auto scope = DECLARE_CATCH_SCOPE(vm); 55 56 56 57 Base::finishCreation(vm); -
trunk/Source/JavaScriptCore/runtime/JSModuleLoader.cpp
r276900 r279924 42 42 #include "Parser.h" 43 43 #include "ParserError.h" 44 #include "VMTrapsInlines.h" 44 45 45 46 namespace JSC { … … 99 100 void JSModuleLoader::finishCreation(JSGlobalObject* globalObject, VM& vm) 100 101 { 102 DeferTerminationForAWhile deferScope(vm); 101 103 auto scope = DECLARE_CATCH_SCOPE(vm); 102 104 -
trunk/Source/WebCore/ChangeLog
r279919 r279924 1 2021-07-14 Mark Lam <mark.lam@apple.com> 2 3 Speculative fix for failed scope.releaseAssertNoException() after calls to JSMap::create(). 4 https://bugs.webkit.org/show_bug.cgi?id=227964 5 rdar://78013960 6 7 Reviewed by Yusuke Suzuki. 8 9 * bindings/js/JSDOMMapLike.cpp: 10 (WebCore::getBackingMap): 11 1 12 2021-07-14 Jer Noble <jer.noble@apple.com> 2 13 -
trunk/Source/WebCore/bindings/js/JSDOMMapLike.cpp
r276719 r279924 41 41 return { false, *JSC::asObject(backingMap) }; 42 42 43 JSC::DeferTermination deferScope(vm);43 JSC::DeferTerminationForAWhile deferScope(vm); 44 44 auto scope = DECLARE_CATCH_SCOPE(vm); 45 45
Note: See TracChangeset
for help on using the changeset viewer.