Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(797)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp

Issue 2244203002: Fix "report the exception" in Custom Elements V1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed to ErrorEventDispatcher Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
index 6323308b92a65a97eee04e2247b1aca7d9442916..f843f7c21e3914727f50f276cedc1774fac6b06b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
@@ -26,6 +26,7 @@
#include "bindings/core/v8/V8Initializer.h"
#include "bindings/core/v8/DOMWrapperWorld.h"
+#include "bindings/core/v8/ErrorEventDispatcher.h"
#include "bindings/core/v8/RejectedPromises.h"
#include "bindings/core/v8/RetainedDOMInfo.h"
#include "bindings/core/v8/ScriptController.h"
@@ -132,12 +133,9 @@ static void messageHandlerInMainThread(v8::Local<v8::Message> message, v8::Local
ExecutionContext* context = scriptState->getExecutionContext();
std::unique_ptr<SourceLocation> location = SourceLocation::fromMessage(isolate, message, context);
-
- AccessControlStatus accessControlStatus = NotSharableCrossOrigin;
- if (message->IsOpaque())
- accessControlStatus = OpaqueResource;
- else if (message->IsSharedCrossOrigin())
- accessControlStatus = SharableCrossOrigin;
+ AccessControlStatus accessControlStatus =
+ ErrorEventDispatcher::accessControlStatusFromScriptOriginOptions(
+ message->GetScriptOrigin().Options());
ErrorEvent* event = ErrorEvent::create(toCoreStringWithNullCheck(message->Get()), std::move(location), &scriptState->world());

Powered by Google App Engine
This is Rietveld 408576698