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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 void ScriptController::clearForClose() | 134 void ScriptController::clearForClose() |
135 { | 135 { |
136 double start = currentTime(); | 136 double start = currentTime(); |
137 m_windowProxyManager->clearForClose(); | 137 m_windowProxyManager->clearForClose(); |
138 Platform::current()->histogramCustomCounts("WebCore.ScriptController.clearFo
rClose", (currentTime() - start) * 1000, 0, 10000, 50); | 138 Platform::current()->histogramCustomCounts("WebCore.ScriptController.clearFo
rClose", (currentTime() - start) * 1000, 0, 10000, 50); |
139 } | 139 } |
140 | 140 |
141 void ScriptController::updateSecurityOrigin(SecurityOrigin* origin) | 141 void ScriptController::updateSecurityOrigin(SecurityOrigin* origin) |
142 { | 142 { |
143 m_windowProxyManager->mainWorldProxy()->updateSecurityOrigin(origin); | 143 m_windowProxyManager->mainWorldProxy()->updateSecurityOrigin(origin); |
| 144 Vector<std::pair<ScriptState*, SecurityOrigin*>> isolatedContexts; |
| 145 m_windowProxyManager->collectIsolatedContexts(isolatedContexts); |
| 146 for (auto isolatedContext : isolatedContexts) |
| 147 m_windowProxyManager->windowProxy(isolatedContext.first->world())->updat
eSecurityOrigin(isolatedContext.second); |
144 } | 148 } |
145 | 149 |
146 v8::MaybeLocal<v8::Value> ScriptController::callFunction(v8::Local<v8::Function>
function, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[]) | 150 v8::MaybeLocal<v8::Value> ScriptController::callFunction(v8::Local<v8::Function>
function, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[]) |
147 { | 151 { |
148 // Keep LocalFrame (and therefore ScriptController) alive. | 152 // Keep LocalFrame (and therefore ScriptController) alive. |
149 RefPtrWillBeRawPtr<LocalFrame> protect(frame()); | 153 RefPtrWillBeRawPtr<LocalFrame> protect(frame()); |
150 return ScriptController::callFunction(frame()->document(), function, receive
r, argc, info, isolate()); | 154 return ScriptController::callFunction(frame()->document(), function, receive
r, argc, info, isolate()); |
151 } | 155 } |
152 | 156 |
153 v8::MaybeLocal<v8::Value> ScriptController::callFunction(ExecutionContext* conte
xt, v8::Local<v8::Function> function, v8::Local<v8::Value> receiver, int argc, v
8::Local<v8::Value> info[], v8::Isolate* isolate) | 157 v8::MaybeLocal<v8::Value> ScriptController::callFunction(ExecutionContext* conte
xt, v8::Local<v8::Function> function, v8::Local<v8::Value> receiver, int argc, v
8::Local<v8::Value> info[], v8::Isolate* isolate) |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 for (size_t i = 0; i < resultArray->Length(); ++i) { | 597 for (size_t i = 0; i < resultArray->Length(); ++i) { |
594 v8::Local<v8::Value> value; | 598 v8::Local<v8::Value> value; |
595 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) | 599 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) |
596 return; | 600 return; |
597 results->append(value); | 601 results->append(value); |
598 } | 602 } |
599 } | 603 } |
600 } | 604 } |
601 | 605 |
602 } // namespace blink | 606 } // namespace blink |
OLD | NEW |