#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8PerIsolateData.h"
#include "bindings/v8/V8ScriptRunner.h"
+#include "core/dom/ScriptForbiddenScope.h"
namespace WebCore {
{
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;
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<v8::RegExp> regex = m_regex.newLocal(isolate);