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

Side by Side Diff: Source/bindings/v8/V8WindowShell.cpp

Issue 176963017: Remove WrapperWorldType from V8 binding (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/V8PerIsolateData.cpp ('k') | Source/bindings/v8/WrapperTypeInfo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 void V8WindowShell::createContext() 254 void V8WindowShell::createContext()
255 { 255 {
256 // The documentLoader pointer could be 0 during frame shutdown. 256 // The documentLoader pointer could be 0 during frame shutdown.
257 // FIXME: Can we remove this check? 257 // FIXME: Can we remove this check?
258 if (!m_frame->loader().documentLoader()) 258 if (!m_frame->loader().documentLoader())
259 return; 259 return;
260 260
261 // Create a new environment using an empty template for the shadow 261 // Create a new environment using an empty template for the shadow
262 // object. Reuse the global object if one has been created earlier. 262 // object. Reuse the global object if one has been created earlier.
263 v8::Handle<v8::ObjectTemplate> globalTemplate = V8Window::getShadowObjectTem plate(m_isolate, m_world->isMainWorld() ? MainWorld : IsolatedWorld); 263 v8::Handle<v8::ObjectTemplate> globalTemplate = V8Window::getShadowObjectTem plate(m_isolate);
264 if (globalTemplate.IsEmpty()) 264 if (globalTemplate.IsEmpty())
265 return; 265 return;
266 266
267 double contextCreationStartInSeconds = currentTime(); 267 double contextCreationStartInSeconds = currentTime();
268 268
269 // Dynamically tell v8 about our extensions now. 269 // Dynamically tell v8 about our extensions now.
270 const V8Extensions& extensions = ScriptController::registeredExtensions(); 270 const V8Extensions& extensions = ScriptController::registeredExtensions();
271 OwnPtr<const char*[]> extensionNames = adoptArrayPtr(new const char*[extensi ons.size()]); 271 OwnPtr<const char*[]> extensionNames = adoptArrayPtr(new const char*[extensi ons.size()]);
272 int index = 0; 272 int index = 0;
273 int extensionGroup = m_world->extensionGroup(); 273 int extensionGroup = m_world->extensionGroup();
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) 492 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin)
493 { 493 {
494 ASSERT(m_world->isMainWorld()); 494 ASSERT(m_world->isMainWorld());
495 if (!m_perContextData) 495 if (!m_perContextData)
496 return; 496 return;
497 v8::HandleScope handleScope(m_isolate); 497 v8::HandleScope handleScope(m_isolate);
498 setSecurityToken(origin); 498 setSecurityToken(origin);
499 } 499 }
500 500
501 } // WebCore 501 } // WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8PerIsolateData.cpp ('k') | Source/bindings/v8/WrapperTypeInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698