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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp

Issue 2640823004: Allow origin trials to be enabled by script (Closed)
Patch Set: Address nit Created 3 years, 10 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
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 setSecurityToken(origin); 116 setSecurityToken(origin);
117 } 117 }
118 118
119 MainThreadDebugger::instance()->contextCreated(m_scriptState.get(), frame(), 119 MainThreadDebugger::instance()->contextCreated(m_scriptState.get(), frame(),
120 origin); 120 origin);
121 frame()->loader().client()->didCreateScriptContext(context, 121 frame()->loader().client()->didCreateScriptContext(context,
122 m_world->worldId()); 122 m_world->worldId());
123 // If conditional features for window have been queued before the V8 context 123 // If conditional features for window have been queued before the V8 context
124 // was ready, then inject them into the context now 124 // was ready, then inject them into the context now
125 if (m_world->isMainWorld()) { 125 if (m_world->isMainWorld()) {
126 installPendingConditionalFeaturesOnWindow(m_scriptState.get()); 126 installConditionalFeaturesOnWindow(m_scriptState.get());
127 } 127 }
128 128
129 if (m_world->isMainWorld()) 129 if (m_world->isMainWorld())
130 frame()->loader().dispatchDidClearWindowObjectInMainWorld(); 130 frame()->loader().dispatchDidClearWindowObjectInMainWorld();
131 } 131 }
132 132
133 void LocalWindowProxy::createContext() { 133 void LocalWindowProxy::createContext() {
134 // Create a new v8::Context with the window object as the global object 134 // Create a new v8::Context with the window object as the global object
135 // (aka the inner global). Reuse the global proxy object (aka the outer 135 // (aka the inner global). Reuse the global proxy object (aka the outer
136 // global) if it already exists. See the comments in 136 // global) if it already exists. See the comments in
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 setSecurityToken(origin); 355 setSecurityToken(origin);
356 } 356 }
357 357
358 LocalWindowProxy::LocalWindowProxy(v8::Isolate* isolate, 358 LocalWindowProxy::LocalWindowProxy(v8::Isolate* isolate,
359 LocalFrame& frame, 359 LocalFrame& frame,
360 RefPtr<DOMWrapperWorld> world) 360 RefPtr<DOMWrapperWorld> world)
361 : WindowProxy(isolate, frame, std::move(world)) {} 361 : WindowProxy(isolate, frame, std::move(world)) {}
362 362
363 } // namespace blink 363 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698