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

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

Issue 1036803002: binidngs: Make callInternalFunction return MaybeLocal (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/ScriptRegexp.cpp
diff --git a/Source/bindings/core/v8/ScriptRegexp.cpp b/Source/bindings/core/v8/ScriptRegexp.cpp
index 50389d1dc8aff0fd05abbf5d1cf9ae6a58599b10..8e1fa5fdb2020ec58d2b00bfe16a576a57417d1a 100644
--- a/Source/bindings/core/v8/ScriptRegexp.cpp
+++ b/Source/bindings/core/v8/ScriptRegexp.cpp
@@ -78,9 +78,8 @@ int ScriptRegexp::match(const String& string, int startFrom, int* matchLength) c
v8::Local<v8::RegExp> regex = m_regex.newLocal(isolate);
v8::Local<v8::Function> exec = regex->Get(v8AtomicString(isolate, "exec")).As<v8::Function>();
v8::Local<v8::Value> argv[] = { v8String(isolate, string.substring(startFrom)) };
- v8::Local<v8::Value> returnValue = V8ScriptRunner::callInternalFunction(exec, regex, WTF_ARRAY_LENGTH(argv), argv, isolate);
-
- if (tryCatch.HasCaught())
+ v8::Local<v8::Value> returnValue;
+ if (!V8ScriptRunner::callInternalFunction(exec, regex, WTF_ARRAY_LENGTH(argv), argv, isolate).ToLocal(&returnValue))
yurys 2015/03/25 12:21:48 I don't quite understand what's the advantage of r
return -1;
// RegExp#exec returns null if there's no match, otherwise it returns an

Powered by Google App Engine
This is Rietveld 408576698