| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 m_isolatedWorlds.set(world->worldId(), isolatedWorldShell.release())
; | 256 m_isolatedWorlds.set(world->worldId(), isolatedWorldShell.release())
; |
| 257 } | 257 } |
| 258 } | 258 } |
| 259 if (!shell->isContextInitialized() && shell->initializeIfNeeded()) | 259 if (!shell->isContextInitialized() && shell->initializeIfNeeded()) |
| 260 m_frame->loader().dispatchDidClearWindowObjectInWorld(world); | 260 m_frame->loader().dispatchDidClearWindowObjectInWorld(world); |
| 261 return shell; | 261 return shell; |
| 262 } | 262 } |
| 263 | 263 |
| 264 bool ScriptController::shouldBypassMainWorldContentSecurityPolicy() | 264 bool ScriptController::shouldBypassMainWorldContentSecurityPolicy() |
| 265 { | 265 { |
| 266 DOMWrapperWorld* world = DOMWrapperWorld::current(m_isolate); | 266 if (DOMWrapperWorld* world = isolatedWorldForEnteredContext(m_isolate)) |
| 267 if (world && world->isIsolatedWorld()) | |
| 268 return world->isolatedWorldHasContentSecurityPolicy(); | 267 return world->isolatedWorldHasContentSecurityPolicy(); |
| 269 return false; | 268 return false; |
| 270 } | 269 } |
| 271 | 270 |
| 272 TextPosition ScriptController::eventHandlerPosition() const | 271 TextPosition ScriptController::eventHandlerPosition() const |
| 273 { | 272 { |
| 274 ScriptableDocumentParser* parser = m_frame->document()->scriptableDocumentPa
rser(); | 273 ScriptableDocumentParser* parser = m_frame->document()->scriptableDocumentPa
rser(); |
| 275 if (parser) | 274 if (parser) |
| 276 return parser->textPosition(); | 275 return parser->textPosition(); |
| 277 return TextPosition::minimumPosition(); | 276 return TextPosition::minimumPosition(); |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 v8Results = evaluateHandleScope.Escape(resultArray); | 650 v8Results = evaluateHandleScope.Escape(resultArray); |
| 652 } | 651 } |
| 653 | 652 |
| 654 if (results && !v8Results.IsEmpty()) { | 653 if (results && !v8Results.IsEmpty()) { |
| 655 for (size_t i = 0; i < v8Results->Length(); ++i) | 654 for (size_t i = 0; i < v8Results->Length(); ++i) |
| 656 results->append(ScriptValue(v8Results->Get(i), m_isolate)); | 655 results->append(ScriptValue(v8Results->Get(i), m_isolate)); |
| 657 } | 656 } |
| 658 } | 657 } |
| 659 | 658 |
| 660 } // namespace WebCore | 659 } // namespace WebCore |
| OLD | NEW |