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

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

Issue 218813002: Revert 170357 "Revert of Make DOMWrapperWorld::current() return ..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 8 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 { 71 {
72 ASSERT(V8Document::toNative(wrapper) == document); 72 ASSERT(V8Document::toNative(wrapper) == document);
73 ASSERT(!document->isHTMLDocument() || (V8Document::toNative(v8::Handle<v8::O bject>::Cast(wrapper->GetPrototype())) == document)); 73 ASSERT(!document->isHTMLDocument() || (V8Document::toNative(v8::Handle<v8::O bject>::Cast(wrapper->GetPrototype())) == document));
74 } 74 }
75 75
76 static void setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContex t, int debugId) 76 static void setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContex t, int debugId)
77 { 77 {
78 V8PerContextDebugData::setContextDebugData(targetContext, "injected", debugI d); 78 V8PerContextDebugData::setContextDebugData(targetContext, "injected", debugI d);
79 } 79 }
80 80
81 PassOwnPtr<V8WindowShell> V8WindowShell::create(LocalFrame* frame, PassRefPtr<DO MWrapperWorld> world, v8::Isolate* isolate) 81 PassOwnPtr<V8WindowShell> V8WindowShell::create(LocalFrame* frame, DOMWrapperWor ld& world, v8::Isolate* isolate)
82 { 82 {
83 return adoptPtr(new V8WindowShell(frame, world, isolate)); 83 return adoptPtr(new V8WindowShell(frame, &world, isolate));
84 } 84 }
85 85
86 V8WindowShell::V8WindowShell(LocalFrame* frame, PassRefPtr<DOMWrapperWorld> worl d, v8::Isolate* isolate) 86 V8WindowShell::V8WindowShell(LocalFrame* frame, PassRefPtr<DOMWrapperWorld> worl d, v8::Isolate* isolate)
87 : m_frame(frame) 87 : m_frame(frame)
88 , m_world(world) 88 , m_world(world)
89 , m_isolate(isolate) 89 , m_isolate(isolate)
90 { 90 {
91 } 91 }
92 92
93 void V8WindowShell::disposeContext(GlobalDetachmentBehavior behavior) 93 void V8WindowShell::disposeContext(GlobalDetachmentBehavior behavior)
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) 498 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin)
499 { 499 {
500 ASSERT(m_world->isMainWorld()); 500 ASSERT(m_world->isMainWorld());
501 if (!m_perContextData) 501 if (!m_perContextData)
502 return; 502 return;
503 v8::HandleScope handleScope(m_isolate); 503 v8::HandleScope handleScope(m_isolate);
504 setSecurityToken(origin); 504 setSecurityToken(origin);
505 } 505 }
506 506
507 } // WebCore 507 } // WebCore
OLDNEW
« no previous file with comments | « trunk/Source/bindings/v8/V8WindowShell.h ('k') | trunk/Source/bindings/v8/WorkerScriptController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698