| OLD | NEW |
| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 void ScriptController::updateSecurityOrigin(SecurityOrigin* origin) | 105 void ScriptController::updateSecurityOrigin(SecurityOrigin* origin) |
| 106 { | 106 { |
| 107 m_windowProxyManager->mainWorldProxy()->updateSecurityOrigin(origin); | 107 m_windowProxyManager->mainWorldProxy()->updateSecurityOrigin(origin); |
| 108 Vector<std::pair<ScriptState*, SecurityOrigin*>> isolatedContexts; | 108 Vector<std::pair<ScriptState*, SecurityOrigin*>> isolatedContexts; |
| 109 m_windowProxyManager->collectIsolatedContexts(isolatedContexts); | 109 m_windowProxyManager->collectIsolatedContexts(isolatedContexts); |
| 110 for (auto isolatedContext : isolatedContexts) | 110 for (auto isolatedContext : isolatedContexts) |
| 111 m_windowProxyManager->windowProxy(isolatedContext.first->world())->updat
eSecurityOrigin(isolatedContext.second); | 111 m_windowProxyManager->windowProxy(isolatedContext.first->world())->updat
eSecurityOrigin(isolatedContext.second); |
| 112 } | 112 } |
| 113 | 113 |
| 114 v8::MaybeLocal<v8::Value> ScriptController::callFunction(v8::Local<v8::Function>
function, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[]) | |
| 115 { | |
| 116 return V8ScriptRunner::callFunction(function, frame()->document(), receiver,
argc, info, isolate()); | |
| 117 } | |
| 118 | |
| 119 v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(v8::Local<v8:
:Context> context, const ScriptSourceCode& source, AccessControlStatus accessCon
trolStatus, double* compilationFinishTime) | 114 v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(v8::Local<v8:
:Context> context, const ScriptSourceCode& source, AccessControlStatus accessCon
trolStatus, double* compilationFinishTime) |
| 120 { | 115 { |
| 121 TRACE_EVENT1("devtools.timeline", "EvaluateScript", "data", InspectorEvaluat
eScriptEvent::data(frame(), source.url().getString(), source.startPosition())); | 116 TRACE_EVENT1("devtools.timeline", "EvaluateScript", "data", InspectorEvaluat
eScriptEvent::data(frame(), source.url().getString(), source.startPosition())); |
| 122 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(frame()->documen
t(), "scriptFirstStatement", false); | 117 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(frame()->documen
t(), "scriptFirstStatement", false); |
| 123 | 118 |
| 124 v8::Local<v8::Value> result; | 119 v8::Local<v8::Value> result; |
| 125 { | 120 { |
| 126 V8CacheOptions v8CacheOptions(V8CacheOptionsDefault); | 121 V8CacheOptions v8CacheOptions(V8CacheOptionsDefault); |
| 127 if (frame()->settings()) | 122 if (frame()->settings()) |
| 128 v8CacheOptions = frame()->settings()->v8CacheOptions(); | 123 v8CacheOptions = frame()->settings()->v8CacheOptions(); |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 for (size_t i = 0; i < resultArray->Length(); ++i) { | 429 for (size_t i = 0; i < resultArray->Length(); ++i) { |
| 435 v8::Local<v8::Value> value; | 430 v8::Local<v8::Value> value; |
| 436 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) | 431 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) |
| 437 return; | 432 return; |
| 438 results->append(value); | 433 results->append(value); |
| 439 } | 434 } |
| 440 } | 435 } |
| 441 } | 436 } |
| 442 | 437 |
| 443 } // namespace blink | 438 } // namespace blink |
| OLD | NEW |