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

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

Issue 1112793002: Removing blink::prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing buildIssues Created 5 years, 7 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 disposeUnderlyingV8Object(isolate(), m_windowScriptNPObject); 126 disposeUnderlyingV8Object(isolate(), m_windowScriptNPObject);
127 _NPN_ReleaseObject(m_windowScriptNPObject); 127 _NPN_ReleaseObject(m_windowScriptNPObject);
128 m_windowScriptNPObject = 0; 128 m_windowScriptNPObject = 0;
129 } 129 }
130 } 130 }
131 131
132 void ScriptController::clearForClose() 132 void ScriptController::clearForClose()
133 { 133 {
134 double start = currentTime(); 134 double start = currentTime();
135 m_windowProxyManager->clearForClose(); 135 m_windowProxyManager->clearForClose();
136 blink::Platform::current()->histogramCustomCounts("WebCore.ScriptController. clearForClose", (currentTime() - start) * 1000, 0, 10000, 50); 136 Platform::current()->histogramCustomCounts("WebCore.ScriptController.clearFo rClose", (currentTime() - start) * 1000, 0, 10000, 50);
137 } 137 }
138 138
139 void ScriptController::updateSecurityOrigin(SecurityOrigin* origin) 139 void ScriptController::updateSecurityOrigin(SecurityOrigin* origin)
140 { 140 {
141 m_windowProxyManager->mainWorldProxy()->updateSecurityOrigin(origin); 141 m_windowProxyManager->mainWorldProxy()->updateSecurityOrigin(origin);
142 } 142 }
143 143
144 v8::MaybeLocal<v8::Value> ScriptController::callFunction(v8::Local<v8::Function> function, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[]) 144 v8::MaybeLocal<v8::Value> ScriptController::callFunction(v8::Local<v8::Function> function, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[])
145 { 145 {
146 // Keep LocalFrame (and therefore ScriptController) alive. 146 // Keep LocalFrame (and therefore ScriptController) alive.
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 { 399 {
400 // V8 binding expects ScriptController::clearWindowProxy only be called 400 // V8 binding expects ScriptController::clearWindowProxy only be called
401 // when a frame is loading a new page. This creates a new context for the ne w page. 401 // when a frame is loading a new page. This creates a new context for the ne w page.
402 402
403 double start = currentTime(); 403 double start = currentTime();
404 // The V8 context must be available for |clearScriptObjects()|. 404 // The V8 context must be available for |clearScriptObjects()|.
405 // The below call must be before |clearForNavigation()| which disposes the V 8 context. 405 // The below call must be before |clearForNavigation()| which disposes the V 8 context.
406 clearScriptObjects(); 406 clearScriptObjects();
407 407
408 m_windowProxyManager->clearForNavigation(); 408 m_windowProxyManager->clearForNavigation();
409 blink::Platform::current()->histogramCustomCounts("WebCore.ScriptController. clearWindowProxy", (currentTime() - start) * 1000, 0, 10000, 50); 409 Platform::current()->histogramCustomCounts("WebCore.ScriptController.clearWi ndowProxy", (currentTime() - start) * 1000, 0, 10000, 50);
410 } 410 }
411 411
412 void ScriptController::setCaptureCallStackForUncaughtExceptions(bool value) 412 void ScriptController::setCaptureCallStackForUncaughtExceptions(bool value)
413 { 413 {
414 v8::V8::SetCaptureStackTraceForUncaughtExceptions(value, ScriptCallStack::ma xCallStackSizeToCapture, stackTraceOptions); 414 v8::V8::SetCaptureStackTraceForUncaughtExceptions(value, ScriptCallStack::ma xCallStackSizeToCapture, stackTraceOptions);
415 } 415 }
416 416
417 void ScriptController::collectIsolatedContexts(Vector<std::pair<ScriptState*, Se curityOrigin*>>& result) 417 void ScriptController::collectIsolatedContexts(Vector<std::pair<ScriptState*, Se curityOrigin*>>& result)
418 { 418 {
419 m_windowProxyManager->collectIsolatedContexts(result); 419 m_windowProxyManager->collectIsolatedContexts(result);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 for (size_t i = 0; i < resultArray->Length(); ++i) { 590 for (size_t i = 0; i < resultArray->Length(); ++i) {
591 v8::Local<v8::Value> value; 591 v8::Local<v8::Value> value;
592 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) 592 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value))
593 return; 593 return;
594 results->append(value); 594 results->append(value);
595 } 595 }
596 } 596 }
597 } 597 }
598 598
599 } // namespace blink 599 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/CallbackPromiseAdapter.h ('k') | Source/bindings/core/v8/ScriptDebugServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698