| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 return result; | 191 return result; |
| 192 } | 192 } |
| 193 | 193 |
| 194 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update
Counters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data(
)); | 194 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update
Counters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data(
)); |
| 195 | 195 |
| 196 return result; | 196 return result; |
| 197 } | 197 } |
| 198 | 198 |
| 199 bool ScriptController::initializeMainWorld() | 199 bool ScriptController::initializeMainWorld() |
| 200 { | 200 { |
| 201 if (m_windowProxyManager->mainWorldProxy()->isContextInitialized()) | 201 if (m_windowProxyManager->mainWorldProxy()->isContextInitialized() || frame(
)->loader().stateMachine()->creatingInitialEmptyDocument()) |
| 202 return false; | 202 return false; |
| 203 return windowProxy(DOMWrapperWorld::mainWorld())->isContextInitialized(); | 203 return windowProxy(DOMWrapperWorld::mainWorld())->isContextInitialized(); |
| 204 } | 204 } |
| 205 | 205 |
| 206 WindowProxy* ScriptController::existingWindowProxy(DOMWrapperWorld& world) | 206 WindowProxy* ScriptController::existingWindowProxy(DOMWrapperWorld& world) |
| 207 { | 207 { |
| 208 return m_windowProxyManager->existingWindowProxy(world); | 208 return m_windowProxyManager->existingWindowProxy(world); |
| 209 } | 209 } |
| 210 | 210 |
| 211 WindowProxy* ScriptController::windowProxy(DOMWrapperWorld& world) | 211 WindowProxy* ScriptController::windowProxy(DOMWrapperWorld& world) |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 for (size_t i = 0; i < resultArray->Length(); ++i) { | 597 for (size_t i = 0; i < resultArray->Length(); ++i) { |
| 598 v8::Local<v8::Value> value; | 598 v8::Local<v8::Value> value; |
| 599 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) | 599 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) |
| 600 return; | 600 return; |
| 601 results->append(value); | 601 results->append(value); |
| 602 } | 602 } |
| 603 } | 603 } |
| 604 } | 604 } |
| 605 | 605 |
| 606 } // namespace blink | 606 } // namespace blink |
| OLD | NEW |