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

Unified Diff: Source/bindings/core/v8/ScriptController.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
« no previous file with comments | « Source/bindings/core/v8/NPV8Object.cpp ('k') | Source/bindings/core/v8/ScriptFunctionCall.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptController.cpp
diff --git a/Source/bindings/core/v8/ScriptController.cpp b/Source/bindings/core/v8/ScriptController.cpp
index 5387064a023605647755730f784717c26fe24870..7415b3ca1705518a809bee1e2e717b73ee92268b 100644
--- a/Source/bindings/core/v8/ScriptController.cpp
+++ b/Source/bindings/core/v8/ScriptController.cpp
@@ -587,8 +587,12 @@ void ScriptController::executeScriptInIsolatedWorld(int worldID, const WillBeHea
}
if (results) {
- for (size_t i = 0; i < resultArray->Length(); ++i)
- results->append(resultArray->Get(i));
+ for (size_t i = 0; i < resultArray->Length(); ++i) {
+ v8::Local<v8::Value> value;
+ if (!resultArray->Get(scriptState->context(), i).ToLocal(&value))
+ return;
+ results->append(value);
+ }
}
}
« no previous file with comments | « Source/bindings/core/v8/NPV8Object.cpp ('k') | Source/bindings/core/v8/ScriptFunctionCall.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698