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

Unified Diff: Source/bindings/core/v8/custom/V8MessageEventCustom.cpp

Issue 534133002: [WIP] bindings: Introduce PropertyBag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « Source/bindings/core/v8/custom/V8BlobCustomHelpers.cpp ('k') | Source/bindings/core/v8/v8.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp b/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
index 8bc5ad18bd0140646cdf2beac519801f9a6ab22f..52b0de23666c93516a82c7cb68550f4136e50e4a 100644
--- a/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
@@ -114,11 +114,12 @@ void V8MessageEvent::initMessageEventMethodCustom(const v8::FunctionCallbackInfo
LocalDOMWindow* sourceArg = toDOMWindow(info[6], info.GetIsolate());
OwnPtrWillBeRawPtr<MessagePortArray> portArray = nullptr;
const int portArrayIndex = 7;
+
if (!isUndefinedOrNull(info[portArrayIndex])) {
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "initMessageEvent", info.Holder(), info.GetIsolate());
portArray = adoptPtrWillBeNoop(new MessagePortArray);
- bool success = false;
- *portArray = toRefPtrWillBeMemberNativeArray<MessagePort, V8MessagePort>(info[portArrayIndex], portArrayIndex + 1, info.GetIsolate(), &success);
- if (!success)
+ *portArray = toRefPtrWillBeMemberNativeArray<MessagePort, V8MessagePort>(info[portArrayIndex], portArrayIndex + 1, info.GetIsolate(), &exceptionState);
+ if (exceptionState.throwIfNeeded())
return;
}
event->initMessageEvent(typeArg, canBubbleArg, cancelableArg, originArg, lastEventIdArg, sourceArg, portArray.release());
« no previous file with comments | « Source/bindings/core/v8/custom/V8BlobCustomHelpers.cpp ('k') | Source/bindings/core/v8/v8.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698