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

Unified Diff: sky/engine/bindings/core/v8/V8PerIsolateData.cpp

Issue 727593004: Wire up the Inspector V8 Debugger (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Actually works Created 6 years, 1 month 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: sky/engine/bindings/core/v8/V8PerIsolateData.cpp
diff --git a/sky/engine/bindings/core/v8/V8PerIsolateData.cpp b/sky/engine/bindings/core/v8/V8PerIsolateData.cpp
index a0910df7c13aa3cbe3abad1d2f435220c0d49b79..298fd854b4d0bee4c8152c08ac306f176b543f2a 100644
--- a/sky/engine/bindings/core/v8/V8PerIsolateData.cpp
+++ b/sky/engine/bindings/core/v8/V8PerIsolateData.cpp
@@ -86,6 +86,8 @@ V8PerIsolateData::V8PerIsolateData()
V8PerIsolateData::~V8PerIsolateData()
{
+ if (m_scriptRegexpScriptState)
+ m_scriptRegexpScriptState->disposePerContextData();
if (isMainThread())
mainThreadPerIsolateData = 0;
}
@@ -156,6 +158,15 @@ void V8PerIsolateData::setDOMTemplate(void* domTemplateKey, v8::Handle<v8::Funct
currentDOMTemplateMap().add(domTemplateKey, v8::Eternal<v8::FunctionTemplate>(isolate(), v8::Local<v8::FunctionTemplate>(templ)));
}
+v8::Local<v8::Context> V8PerIsolateData::ensureScriptRegexpContext()
+{
+ if (!m_scriptRegexpScriptState) {
+ v8::Local<v8::Context> context(v8::Context::New(isolate()));
+ m_scriptRegexpScriptState = ScriptState::create(context, DOMWrapperWorld::create());
+ }
+ return m_scriptRegexpScriptState->context();
+}
+
bool V8PerIsolateData::hasInstance(const WrapperTypeInfo* info, v8::Handle<v8::Value> value)
{
return hasInstance(info, value, m_domTemplateMapForMainWorld)

Powered by Google App Engine
This is Rietveld 408576698