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

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

Issue 2607743002: Remove existingWindowProxy() (Closed)
Patch Set: Created 3 years, 11 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 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data", 208 "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data",
209 InspectorUpdateCountersEvent::data()); 209 InspectorUpdateCountersEvent::data());
210 } 210 }
211 211
212 bool ScriptController::initializeMainWorld() { 212 bool ScriptController::initializeMainWorld() {
213 if (m_windowProxyManager->mainWorldProxy()->isContextInitialized()) 213 if (m_windowProxyManager->mainWorldProxy()->isContextInitialized())
214 return false; 214 return false;
215 return windowProxy(DOMWrapperWorld::mainWorld())->isContextInitialized(); 215 return windowProxy(DOMWrapperWorld::mainWorld())->isContextInitialized();
216 } 216 }
217 217
218 WindowProxy* ScriptController::existingWindowProxy(DOMWrapperWorld& world) {
219 return m_windowProxyManager->existingWindowProxy(world);
220 }
221
222 WindowProxy* ScriptController::windowProxy(DOMWrapperWorld& world) { 218 WindowProxy* ScriptController::windowProxy(DOMWrapperWorld& world) {
223 WindowProxy* windowProxy = m_windowProxyManager->windowProxy(world); 219 WindowProxy* windowProxy = m_windowProxyManager->windowProxy(world);
224 if (!windowProxy->isContextInitialized()) { 220 if (!windowProxy->isContextInitialized()) {
225 windowProxy->initializeIfNeeded(); 221 windowProxy->initializeIfNeeded();
226 if (world.isMainWorld()) 222 if (world.isMainWorld())
227 frame()->loader().dispatchDidClearWindowObjectInMainWorld(); 223 frame()->loader().dispatchDidClearWindowObjectInMainWorld();
228 } 224 }
229 return windowProxy; 225 return windowProxy;
230 } 226 }
231 227
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 for (size_t i = 0; i < resultArray->Length(); ++i) { 490 for (size_t i = 0; i < resultArray->Length(); ++i) {
495 v8::Local<v8::Value> value; 491 v8::Local<v8::Value> value;
496 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) 492 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value))
497 return; 493 return;
498 results->push_back(value); 494 results->push_back(value);
499 } 495 }
500 } 496 }
501 } 497 }
502 498
503 } // namespace blink 499 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698