| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 OwnPtr<V8WindowShell> isolatedWorldShell = V8WindowShell::create(m_f
rame, world, m_isolate); | 226 OwnPtr<V8WindowShell> isolatedWorldShell = V8WindowShell::create(m_f
rame, world, m_isolate); |
| 227 shell = isolatedWorldShell.get(); | 227 shell = isolatedWorldShell.get(); |
| 228 m_isolatedWorlds.set(world.worldId(), isolatedWorldShell.release()); | 228 m_isolatedWorlds.set(world.worldId(), isolatedWorldShell.release()); |
| 229 } | 229 } |
| 230 } | 230 } |
| 231 if (!shell->isContextInitialized() && shell->initializeIfNeeded() && world.i
sMainWorld()) | 231 if (!shell->isContextInitialized() && shell->initializeIfNeeded() && world.i
sMainWorld()) |
| 232 m_frame->loader().dispatchDidClearWindowObjectInMainWorld(); | 232 m_frame->loader().dispatchDidClearWindowObjectInMainWorld(); |
| 233 return shell; | 233 return shell; |
| 234 } | 234 } |
| 235 | 235 |
| 236 bool ScriptController::shouldBypassMainWorldContentSecurityPolicy() | 236 bool ScriptController::shouldBypassMainWorldCSP() |
| 237 { | 237 { |
| 238 v8::Handle<v8::Context> context = m_isolate->GetCurrentContext(); | 238 v8::Handle<v8::Context> context = m_isolate->GetCurrentContext(); |
| 239 if (context.IsEmpty() || !toDOMWindow(context)) | 239 if (context.IsEmpty() || !toDOMWindow(context)) |
| 240 return false; | 240 return false; |
| 241 DOMWrapperWorld& world = DOMWrapperWorld::current(m_isolate); | 241 DOMWrapperWorld& world = DOMWrapperWorld::current(m_isolate); |
| 242 return world.isIsolatedWorld() ? world.isolatedWorldHasContentSecurityPolicy
() : false; | 242 return world.isIsolatedWorld() ? world.isolatedWorldHasContentSecurityPolicy
() : false; |
| 243 } | 243 } |
| 244 | 244 |
| 245 TextPosition ScriptController::eventHandlerPosition() const | 245 TextPosition ScriptController::eventHandlerPosition() const |
| 246 { | 246 { |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 resultArray->Set(i, evaluationResult); | 615 resultArray->Set(i, evaluationResult); |
| 616 } | 616 } |
| 617 | 617 |
| 618 if (results) { | 618 if (results) { |
| 619 for (size_t i = 0; i < resultArray->Length(); ++i) | 619 for (size_t i = 0; i < resultArray->Length(); ++i) |
| 620 results->append(handleScope.Escape(resultArray->Get(i))); | 620 results->append(handleScope.Escape(resultArray->Get(i))); |
| 621 } | 621 } |
| 622 } | 622 } |
| 623 | 623 |
| 624 } // namespace WebCore | 624 } // namespace WebCore |
| OLD | NEW |