X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fbindings%2Fv8%2FScriptRegexp.cpp;h=5f951caee1f54ba5774d657355545f4cc85485f1;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=0d5df307a03afd9873317bd1afcc92990dc48ed1;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/bindings/v8/ScriptRegexp.cpp b/src/third_party/WebKit/Source/bindings/v8/ScriptRegexp.cpp index 0d5df30..5f951ca 100644 --- a/src/third_party/WebKit/Source/bindings/v8/ScriptRegexp.cpp +++ b/src/third_party/WebKit/Source/bindings/v8/ScriptRegexp.cpp @@ -32,6 +32,7 @@ #include "bindings/v8/V8Binding.h" #include "bindings/v8/V8PerIsolateData.h" #include "bindings/v8/V8ScriptRunner.h" +#include "core/dom/ScriptForbiddenScope.h" namespace WebCore { @@ -39,7 +40,7 @@ ScriptRegexp::ScriptRegexp(const String& pattern, TextCaseSensitivity caseSensit { v8::Isolate* isolate = v8::Isolate::GetCurrent(); v8::HandleScope handleScope(isolate); - v8::Context::Scope contextScope(V8PerIsolateData::from(isolate)->ensureRegexContext()); + v8::Context::Scope contextScope(V8PerIsolateData::from(isolate)->ensureDomInJSContext()); v8::TryCatch tryCatch; unsigned flags = v8::RegExp::kNone; @@ -67,9 +68,11 @@ int ScriptRegexp::match(const String& string, int startFrom, int* matchLength) c if (string.length() > INT_MAX) return -1; + ScriptForbiddenScope::AllowUserAgentScript allowScript; + v8::Isolate* isolate = v8::Isolate::GetCurrent(); v8::HandleScope handleScope(isolate); - v8::Context::Scope contextScope(V8PerIsolateData::from(isolate)->ensureRegexContext()); + v8::Context::Scope contextScope(V8PerIsolateData::from(isolate)->ensureDomInJSContext()); v8::TryCatch tryCatch; v8::Local regex = m_regex.newLocal(isolate);