Index: Source/bindings/core/v8/ScriptRegexp.cpp |
diff --git a/Source/bindings/core/v8/ScriptRegexp.cpp b/Source/bindings/core/v8/ScriptRegexp.cpp |
index 4df6ad71ffe0b9cd55b6a2444a866f9ea132a099..70b27ca268d5f5461538cd36aa311fbcfd444f03 100644 |
--- a/Source/bindings/core/v8/ScriptRegexp.cpp |
+++ b/Source/bindings/core/v8/ScriptRegexp.cpp |
@@ -76,9 +76,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)) |
return -1; |
// RegExp#exec returns null if there's no match, otherwise it returns an |