Changeset 279178 in webkit
- Timestamp:
- Jun 23, 2021 12:11:59 PM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r279172 r279178 1 2021-06-23 Mark Lam <mark.lam@apple.com> 2 3 Remove unneeded explicit exception checks in ScriptModuleLoader::evaluate(). 4 https://bugs.webkit.org/show_bug.cgi?id=227302 5 6 Reviewed by Yusuke Suzuki. 7 8 A RELEASE_AND_RETURN will do because we're just propagating the exception to the 9 client in both cases. 10 11 * bindings/js/ScriptModuleLoader.cpp: 12 (WebCore::ScriptModuleLoader::evaluate): 13 1 14 2021-06-23 Kimmo Kinnunen <kkinnunen@apple.com> 2 15 -
trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp
r279170 r279178 1 1 /* 2 * Copyright (C) 2015-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2015-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 245 245 246 246 if (m_ownerType == OwnerType::Document) { 247 if (auto* frame = downcast<Document>(m_context).frame()) { 248 auto jsValue = frame->script().evaluateModule(sourceURL, *moduleRecord, awaitedValue, resumeMode); 249 RETURN_IF_EXCEPTION(scope, JSC::jsUndefined()); 250 return jsValue; 251 } 247 if (auto* frame = downcast<Document>(m_context).frame()) 248 RELEASE_AND_RETURN(scope, frame->script().evaluateModule(sourceURL, *moduleRecord, awaitedValue, resumeMode)); 252 249 } else { 253 250 ASSERT(is<WorkerOrWorkletGlobalScope>(m_context)); 254 if (auto* script = downcast<WorkerOrWorkletGlobalScope>(m_context).script()) { 255 auto jsValue = script->evaluateModule(*moduleRecord, awaitedValue, resumeMode); 256 RETURN_IF_EXCEPTION(scope, JSC::jsUndefined()); 257 return jsValue; 258 } 251 if (auto* script = downcast<WorkerOrWorkletGlobalScope>(m_context).script()) 252 RELEASE_AND_RETURN(scope, script->evaluateModule(*moduleRecord, awaitedValue, resumeMode)); 259 253 } 260 254 return JSC::jsUndefined();
Note: See TracChangeset
for help on using the changeset viewer.