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

Unified Diff: Source/bindings/v8/custom/V8MessagePortCustom.cpp

Issue 114363002: Structured cloning: improve DataCloneError reporting. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + reset V8TestInterfaceConstructor.cpp result Created 7 years 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/v8/custom/V8HistoryCustom.cpp ('k') | Source/bindings/v8/custom/V8WindowCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8MessagePortCustom.cpp
diff --git a/Source/bindings/v8/custom/V8MessagePortCustom.cpp b/Source/bindings/v8/custom/V8MessagePortCustom.cpp
index f8eb9df2abdcfe5bbfb05a53b8a648c7aaec5d4d..d9d2a335424895fb9c6af49677fb795d8ec09ef0 100644
--- a/Source/bindings/v8/custom/V8MessagePortCustom.cpp
+++ b/Source/bindings/v8/custom/V8MessagePortCustom.cpp
@@ -48,19 +48,14 @@ void V8MessagePort::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::V
MessagePortArray portArray;
ArrayBufferArray arrayBufferArray;
if (info.Length() > 1) {
- bool notASequence = false;
const int transferablesArgIndex = 1;
- if (!extractTransferables(info[transferablesArgIndex], portArray, arrayBufferArray, notASequence, info.GetIsolate())) {
- if (notASequence) {
- exceptionState.throwTypeError(ExceptionMessages::notAnArrayTypeArgumentOrValue(transferablesArgIndex + 1));
- exceptionState.throwIfNeeded();
- }
+ if (!extractTransferables(info[transferablesArgIndex], transferablesArgIndex, portArray, arrayBufferArray, exceptionState, info.GetIsolate())) {
+ exceptionState.throwIfNeeded();
return;
}
}
- bool didThrow = false;
- RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(info[0], &portArray, &arrayBufferArray, didThrow, info.GetIsolate());
- if (didThrow)
+ RefPtr<SerializedScriptValue> message = SerializedScriptValue::create(info[0], &portArray, &arrayBufferArray, exceptionState, info.GetIsolate());
+ if (exceptionState.throwIfNeeded())
return;
messagePort->postMessage(message.release(), &portArray, exceptionState);
exceptionState.throwIfNeeded();
« no previous file with comments | « Source/bindings/v8/custom/V8HistoryCustom.cpp ('k') | Source/bindings/v8/custom/V8WindowCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698