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

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

Issue 2392843002: Remove WindowProxy::isGlobalInitialized(). (DO NOT COMMIT YET) (Closed)
Patch Set: . Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/WindowProxy.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 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 264 }
265 265
266 void ScriptController::collectIsolatedContexts( 266 void ScriptController::collectIsolatedContexts(
267 Vector<std::pair<ScriptState*, SecurityOrigin*>>& result) { 267 Vector<std::pair<ScriptState*, SecurityOrigin*>>& result) {
268 m_windowProxyManager->collectIsolatedContexts(result); 268 m_windowProxyManager->collectIsolatedContexts(result);
269 } 269 }
270 270
271 void ScriptController::updateDocument() { 271 void ScriptController::updateDocument() {
272 // For an uninitialized main window windowProxy, do not incur the cost of 272 // For an uninitialized main window windowProxy, do not incur the cost of
273 // context initialization. 273 // context initialization.
274 if (!m_windowProxyManager->mainWorldProxy()->isGlobalInitialized()) 274 if (!m_windowProxyManager->mainWorldProxy()->isContextInitialized())
275 return; 275 return;
276 276
277 if (!initializeMainWorld()) 277 if (!initializeMainWorld())
278 windowProxy(DOMWrapperWorld::mainWorld())->updateDocument(); 278 windowProxy(DOMWrapperWorld::mainWorld())->updateDocument();
279 } 279 }
280 280
281 void ScriptController::namedItemAdded(HTMLDocument* doc, 281 void ScriptController::namedItemAdded(HTMLDocument* doc,
282 const AtomicString& name) { 282 const AtomicString& name) {
283 windowProxy(DOMWrapperWorld::mainWorld())->namedItemAdded(doc, name); 283 windowProxy(DOMWrapperWorld::mainWorld())->namedItemAdded(doc, name);
284 } 284 }
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 for (size_t i = 0; i < resultArray->Length(); ++i) { 464 for (size_t i = 0; i < resultArray->Length(); ++i) {
465 v8::Local<v8::Value> value; 465 v8::Local<v8::Value> value;
466 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) 466 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value))
467 return; 467 return;
468 results->append(value); 468 results->append(value);
469 } 469 }
470 } 470 }
471 } 471 }
472 472
473 } // namespace blink 473 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/WindowProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698