Changeset 276530 in webkit
- Timestamp:
- Apr 23, 2021, 4:45:57 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
bindings/js/JSCustomElementInterface.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r276528 r276530 1 2021-04-23 Ryosuke Niwa <rniwa@webkit.org> 2 3 Crash in constructCustomElementSynchronously 4 https://bugs.webkit.org/show_bug.cgi?id=224992 5 <rdar://66988026> 6 7 Reviewed by Tadeu Zagallo. 8 9 Exit early when the global object is nullptr although this shouldn't happen. 10 11 No new tests since we have no reproductions. 12 13 * bindings/js/JSCustomElementInterface.cpp: 14 (WebCore::JSCustomElementInterface::tryToConstructCustomElement): Added a null check. 15 1 16 2021-04-23 Don Olmstead <don.olmstead@sony.com> 2 17 -
trunk/Source/WebCore/bindings/js/JSCustomElementInterface.cpp
r268700 r276530 100 100 101 101 ASSERT(&document == scriptExecutionContext()); 102 auto& lexicalGlobalObject = *document.globalObject(); 103 auto element = constructCustomElementSynchronously(document, vm, lexicalGlobalObject, m_constructor.get(), localName); 102 auto* lexicalGlobalObject = document.globalObject(); 103 ASSERT(lexicalGlobalObject); 104 if (!lexicalGlobalObject) 105 return nullptr; 106 auto element = constructCustomElementSynchronously(document, vm, *lexicalGlobalObject, m_constructor.get(), localName); 104 107 EXCEPTION_ASSERT(!!scope.exception() == !element); 105 108 if (!element) { 106 109 auto* exception = scope.exception(); 107 110 scope.clearException(); 108 reportException( &lexicalGlobalObject, exception);111 reportException(lexicalGlobalObject, exception); 109 112 return nullptr; 110 113 }
Note:
See TracChangeset
for help on using the changeset viewer.