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

Unified Diff: Source/bindings/core/v8/SerializedScriptValue.cpp

Issue 1067763002: bindings: Use Maybe version of Get in bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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: Source/bindings/core/v8/SerializedScriptValue.cpp
diff --git a/Source/bindings/core/v8/SerializedScriptValue.cpp b/Source/bindings/core/v8/SerializedScriptValue.cpp
index 9407f26d24861414c027e169c41e0d3f8d164b5a..8683387f8a60dedee73ee7576d731e6c80acc59f 100644
--- a/Source/bindings/core/v8/SerializedScriptValue.cpp
+++ b/Source/bindings/core/v8/SerializedScriptValue.cpp
@@ -180,7 +180,9 @@ bool SerializedScriptValue::extractTransferables(v8::Isolate* isolate, v8::Local
// Validate the passed array of transferrables.
for (unsigned i = 0; i < length; ++i) {
- v8::Local<v8::Value> transferrable = transferrables->Get(i);
+ v8::Local<v8::Value> transferrable;
+ if (!transferrables->Get(isolate->GetCurrentContext(), i).ToLocal(&transferrable))
+ return false;
// Validation of non-null objects, per HTML5 spec 10.3.3.
if (isUndefinedOrNull(transferrable)) {
exceptionState.throwTypeError("Value at index " + String::number(i) + " is an untransferable " + (transferrable->IsUndefined() ? "'undefined'" : "'null'") + " value.");
« no previous file with comments | « Source/bindings/core/v8/ScriptValueSerializer.cpp ('k') | Source/bindings/core/v8/V8NodeFilterCondition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698