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

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

Issue 23876015: Pass isolate to v8::Local<>::New() factory function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use isolateForFrame() Created 7 years, 3 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
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // Using the default security token means that the canAccess is always 237 // Using the default security token means that the canAccess is always
238 // called, which is slow. 238 // called, which is slow.
239 // FIXME: Use tokens where possible. This will mean keeping track of all 239 // FIXME: Use tokens where possible. This will mean keeping track of all
240 // created contexts so that they can all be updated when the 240 // created contexts so that they can all be updated when the
241 // document domain 241 // document domain
242 // changes. 242 // changes.
243 context->UseDefaultSecurityToken(); 243 context->UseDefaultSecurityToken();
244 244
245 SecurityOrigin* origin = m_world->isolatedWorldSecurityOrigin(); 245 SecurityOrigin* origin = m_world->isolatedWorldSecurityOrigin();
246 if (origin && InspectorInstrumentation::hasFrontends()) { 246 if (origin && InspectorInstrumentation::hasFrontends()) {
247 ScriptState* scriptState = ScriptState::forContext(v8::Local<v8::Con text>::New(context)); 247 ScriptState* scriptState = ScriptState::forContext(v8::Local<v8::Con text>::New(m_isolate, context));
248 InspectorInstrumentation::didCreateIsolatedContext(m_frame, scriptSt ate, origin); 248 InspectorInstrumentation::didCreateIsolatedContext(m_frame, scriptSt ate, origin);
249 } 249 }
250 } 250 }
251 m_frame->loader()->client()->didCreateScriptContext(context, m_world->extens ionGroup(), m_world->worldId()); 251 m_frame->loader()->client()->didCreateScriptContext(context, m_world->extens ionGroup(), m_world->worldId());
252 return true; 252 return true;
253 } 253 }
254 254
255 void V8WindowShell::createContext() 255 void V8WindowShell::createContext()
256 { 256 {
257 // The activeDocumentLoader pointer could be 0 during frame shutdown. 257 // The activeDocumentLoader pointer could be 0 during frame shutdown.
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 void V8WindowShell::updateSecurityOrigin() 498 void V8WindowShell::updateSecurityOrigin()
499 { 499 {
500 ASSERT(m_world->isMainWorld()); 500 ASSERT(m_world->isMainWorld());
501 if (m_context.isEmpty()) 501 if (m_context.isEmpty())
502 return; 502 return;
503 v8::HandleScope handleScope(m_isolate); 503 v8::HandleScope handleScope(m_isolate);
504 setSecurityToken(); 504 setSecurityToken();
505 } 505 }
506 506
507 } // WebCore 507 } // WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698