Inject $windowNumber on all window objects so we use it to key into a window state hash

This commit is contained in:
Nathan Sobo
2012-04-10 12:14:08 -06:00
parent fa50e9705e
commit 980e1fb9fc

View File

@@ -66,6 +66,9 @@
CefRefPtr<CefV8Value> global = context->GetGlobal();
context->Enter();
CefRefPtr<CefV8Value> windowNumber = CefV8Value::CreateInt(self.window.windowNumber);
global->SetValue("$windowNumber", windowNumber, V8_PROPERTY_ATTRIBUTE_NONE);
CefRefPtr<CefV8Value> bootstrapScript = CefV8Value::CreateString([_bootstrapScript UTF8String]);
global->SetValue("$bootstrapScript", bootstrapScript, V8_PROPERTY_ATTRIBUTE_NONE);