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

Side by Side Diff: sky/engine/bindings/core/v8/V8PerIsolateData.cpp

Issue 776143003: Remove Isolated Worlds from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 void V8PerIsolateData::setDOMTemplate(void* domTemplateKey, v8::Handle<v8::Funct ionTemplate> templ) 156 void V8PerIsolateData::setDOMTemplate(void* domTemplateKey, v8::Handle<v8::Funct ionTemplate> templ)
157 { 157 {
158 currentDOMTemplateMap().add(domTemplateKey, v8::Eternal<v8::FunctionTemplate >(isolate(), v8::Local<v8::FunctionTemplate>(templ))); 158 currentDOMTemplateMap().add(domTemplateKey, v8::Eternal<v8::FunctionTemplate >(isolate(), v8::Local<v8::FunctionTemplate>(templ)));
159 } 159 }
160 160
161 v8::Local<v8::Context> V8PerIsolateData::ensureScriptRegexpContext() 161 v8::Local<v8::Context> V8PerIsolateData::ensureScriptRegexpContext()
162 { 162 {
163 if (!m_scriptRegexpScriptState) { 163 if (!m_scriptRegexpScriptState) {
164 v8::Local<v8::Context> context(v8::Context::New(isolate())); 164 v8::Local<v8::Context> context(v8::Context::New(isolate()));
165 m_scriptRegexpScriptState = ScriptState::create(context, DOMWrapperWorld ::create()); 165 m_scriptRegexpScriptState = ScriptState::create(context, DOMWrapperWorld ::create(FakeWorld));
166 } 166 }
167 return m_scriptRegexpScriptState->context(); 167 return m_scriptRegexpScriptState->context();
168 } 168 }
169 169
170 bool V8PerIsolateData::hasInstance(const WrapperTypeInfo* info, v8::Handle<v8::V alue> value) 170 bool V8PerIsolateData::hasInstance(const WrapperTypeInfo* info, v8::Handle<v8::V alue> value)
171 { 171 {
172 return hasInstance(info, value, m_domTemplateMapForMainWorld) 172 return hasInstance(info, value, m_domTemplateMapForMainWorld)
173 || hasInstance(info, value, m_domTemplateMapForNonMainWorld); 173 || hasInstance(info, value, m_domTemplateMapForNonMainWorld);
174 } 174 }
175 175
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 v8::Handle<v8::FunctionTemplate> V8PerIsolateData::toStringTemplate() 222 v8::Handle<v8::FunctionTemplate> V8PerIsolateData::toStringTemplate()
223 { 223 {
224 if (m_toStringTemplate.isEmpty()) 224 if (m_toStringTemplate.isEmpty())
225 m_toStringTemplate.set(isolate(), v8::FunctionTemplate::New(isolate(), c onstructorOfToString)); 225 m_toStringTemplate.set(isolate(), v8::FunctionTemplate::New(isolate(), c onstructorOfToString));
226 return m_toStringTemplate.newLocal(isolate()); 226 return m_toStringTemplate.newLocal(isolate());
227 } 227 }
228 228
229 } // namespace blink 229 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/bindings/core/v8/V8GCController.cpp ('k') | sky/engine/bindings/core/v8/WindowProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698