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

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

Issue 209713003: Make DOMWrapperWorld::current() return a reference instead of a pointer (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/V8WindowShell.h ('k') | Source/bindings/v8/WorkerScriptController.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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 { 70 {
71 ASSERT(V8Document::toNative(wrapper) == document); 71 ASSERT(V8Document::toNative(wrapper) == document);
72 ASSERT(!document->isHTMLDocument() || (V8Document::toNative(v8::Handle<v8::O bject>::Cast(wrapper->GetPrototype())) == document)); 72 ASSERT(!document->isHTMLDocument() || (V8Document::toNative(v8::Handle<v8::O bject>::Cast(wrapper->GetPrototype())) == document));
73 } 73 }
74 74
75 static void setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContex t, int debugId) 75 static void setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContex t, int debugId)
76 { 76 {
77 V8PerContextDebugData::setContextDebugData(targetContext, "injected", debugI d); 77 V8PerContextDebugData::setContextDebugData(targetContext, "injected", debugI d);
78 } 78 }
79 79
80 PassOwnPtr<V8WindowShell> V8WindowShell::create(LocalFrame* frame, PassRefPtr<DO MWrapperWorld> world, v8::Isolate* isolate) 80 PassOwnPtr<V8WindowShell> V8WindowShell::create(LocalFrame* frame, DOMWrapperWor ld& world, v8::Isolate* isolate)
81 { 81 {
82 return adoptPtr(new V8WindowShell(frame, world, isolate)); 82 return adoptPtr(new V8WindowShell(frame, &world, isolate));
83 } 83 }
84 84
85 V8WindowShell::V8WindowShell(LocalFrame* frame, PassRefPtr<DOMWrapperWorld> worl d, v8::Isolate* isolate) 85 V8WindowShell::V8WindowShell(LocalFrame* frame, PassRefPtr<DOMWrapperWorld> worl d, v8::Isolate* isolate)
86 : m_frame(frame) 86 : m_frame(frame)
87 , m_world(world) 87 , m_world(world)
88 , m_isolate(isolate) 88 , m_isolate(isolate)
89 { 89 {
90 } 90 }
91 91
92 void V8WindowShell::disposeContext(GlobalDetachmentBehavior behavior) 92 void V8WindowShell::disposeContext(GlobalDetachmentBehavior behavior)
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) 490 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin)
491 { 491 {
492 ASSERT(m_world->isMainWorld()); 492 ASSERT(m_world->isMainWorld());
493 if (!m_perContextData) 493 if (!m_perContextData)
494 return; 494 return;
495 v8::HandleScope handleScope(m_isolate); 495 v8::HandleScope handleScope(m_isolate);
496 setSecurityToken(origin); 496 setSecurityToken(origin);
497 } 497 }
498 498
499 } // WebCore 499 } // WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8WindowShell.h ('k') | Source/bindings/v8/WorkerScriptController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698