| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 m_isolatedWorlds.set(world.worldId(), isolatedWorldWindowProxy.relea
se()); | 233 m_isolatedWorlds.set(world.worldId(), isolatedWorldWindowProxy.relea
se()); |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 if (!windowProxy->isContextInitialized() && windowProxy->initializeIfNeeded(
) && world.isMainWorld()) | 236 if (!windowProxy->isContextInitialized() && windowProxy->initializeIfNeeded(
) && world.isMainWorld()) |
| 237 m_frame->loader().dispatchDidClearWindowObjectInMainWorld(); | 237 m_frame->loader().dispatchDidClearWindowObjectInMainWorld(); |
| 238 return windowProxy; | 238 return windowProxy; |
| 239 } | 239 } |
| 240 | 240 |
| 241 bool ScriptController::shouldBypassMainWorldCSP() | 241 bool ScriptController::shouldBypassMainWorldCSP() |
| 242 { | 242 { |
| 243 v8::HandleScope handleScope(m_isolate); |
| 243 v8::Handle<v8::Context> context = m_isolate->GetCurrentContext(); | 244 v8::Handle<v8::Context> context = m_isolate->GetCurrentContext(); |
| 244 if (context.IsEmpty() || !toDOMWindow(context)) | 245 if (context.IsEmpty() || !toDOMWindow(context)) |
| 245 return false; | 246 return false; |
| 246 DOMWrapperWorld& world = DOMWrapperWorld::current(m_isolate); | 247 DOMWrapperWorld& world = DOMWrapperWorld::current(m_isolate); |
| 247 return world.isIsolatedWorld() ? world.isolatedWorldHasContentSecurityPolicy
() : false; | 248 return world.isIsolatedWorld() ? world.isolatedWorldHasContentSecurityPolicy
() : false; |
| 248 } | 249 } |
| 249 | 250 |
| 250 TextPosition ScriptController::eventHandlerPosition() const | 251 TextPosition ScriptController::eventHandlerPosition() const |
| 251 { | 252 { |
| 252 ScriptableDocumentParser* parser = m_frame->document()->scriptableDocumentPa
rser(); | 253 ScriptableDocumentParser* parser = m_frame->document()->scriptableDocumentPa
rser(); |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 resultArray->Set(i, evaluationResult); | 634 resultArray->Set(i, evaluationResult); |
| 634 } | 635 } |
| 635 | 636 |
| 636 if (results) { | 637 if (results) { |
| 637 for (size_t i = 0; i < resultArray->Length(); ++i) | 638 for (size_t i = 0; i < resultArray->Length(); ++i) |
| 638 results->append(handleScope.Escape(resultArray->Get(i))); | 639 results->append(handleScope.Escape(resultArray->Get(i))); |
| 639 } | 640 } |
| 640 } | 641 } |
| 641 | 642 |
| 642 } // namespace blink | 643 } // namespace blink |
| OLD | NEW |