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 |