| 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 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 return V8PerContextDebugData::setContextDebugData(context, "page", debugId); | 466 return V8PerContextDebugData::setContextDebugData(context, "page", debugId); |
| 467 } | 467 } |
| 468 | 468 |
| 469 int ScriptController::contextDebugId(v8::Handle<v8::Context> context) | 469 int ScriptController::contextDebugId(v8::Handle<v8::Context> context) |
| 470 { | 470 { |
| 471 return V8PerContextDebugData::contextDebugId(context); | 471 return V8PerContextDebugData::contextDebugId(context); |
| 472 } | 472 } |
| 473 | 473 |
| 474 void ScriptController::updateDocument() | 474 void ScriptController::updateDocument() |
| 475 { | 475 { |
| 476 // For an uninitialized main window shell, do not incur the cost of context
initialization during FrameLoader::init(). | 476 // For an uninitialized main window shell, do not incur the cost of context
initialization. |
| 477 if ((!m_windowShell->isContextInitialized() || !m_windowShell->isGlobalIniti
alized()) && m_frame->loader().stateMachine()->creatingInitialEmptyDocument()) | 477 if (!m_windowShell->isGlobalInitialized()) |
| 478 return; | 478 return; |
| 479 | 479 |
| 480 if (!initializeMainWorld()) | 480 if (!initializeMainWorld()) |
| 481 windowShell(DOMWrapperWorld::mainWorld())->updateDocument(); | 481 windowShell(DOMWrapperWorld::mainWorld())->updateDocument(); |
| 482 } | 482 } |
| 483 | 483 |
| 484 void ScriptController::namedItemAdded(HTMLDocument* doc, const AtomicString& nam
e) | 484 void ScriptController::namedItemAdded(HTMLDocument* doc, const AtomicString& nam
e) |
| 485 { | 485 { |
| 486 windowShell(DOMWrapperWorld::mainWorld())->namedItemAdded(doc, name); | 486 windowShell(DOMWrapperWorld::mainWorld())->namedItemAdded(doc, name); |
| 487 } | 487 } |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 v8Results = evaluateHandleScope.Escape(resultArray); | 630 v8Results = evaluateHandleScope.Escape(resultArray); |
| 631 } | 631 } |
| 632 | 632 |
| 633 if (results && !v8Results.IsEmpty()) { | 633 if (results && !v8Results.IsEmpty()) { |
| 634 for (size_t i = 0; i < v8Results->Length(); ++i) | 634 for (size_t i = 0; i < v8Results->Length(); ++i) |
| 635 results->append(ScriptValue(v8Results->Get(i), m_isolate)); | 635 results->append(ScriptValue(v8Results->Get(i), m_isolate)); |
| 636 } | 636 } |
| 637 } | 637 } |
| 638 | 638 |
| 639 } // namespace WebCore | 639 } // namespace WebCore |
| OLD | NEW |