Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 namespace WebCore { | 71 namespace WebCore { |
| 72 | 72 |
| 73 static void checkDocumentWrapper(v8::Handle<v8::Object> wrapper, Document* docum ent) | 73 static void checkDocumentWrapper(v8::Handle<v8::Object> wrapper, Document* docum ent) |
| 74 { | 74 { |
| 75 ASSERT(V8Document::toNative(wrapper) == document); | 75 ASSERT(V8Document::toNative(wrapper) == document); |
| 76 ASSERT(!document->isHTMLDocument() || (V8Document::toNative(v8::Handle<v8::O bject>::Cast(wrapper->GetPrototype())) == document)); | 76 ASSERT(!document->isHTMLDocument() || (V8Document::toNative(v8::Handle<v8::O bject>::Cast(wrapper->GetPrototype())) == document)); |
| 77 } | 77 } |
| 78 | 78 |
| 79 static void setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContex t, int debugId) | 79 static void setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContex t, int debugId) |
| 80 { | 80 { |
| 81 V8PerContextDebugData::setContextDebugData(targetContext, "injected", debugI d); | 81 V8PerContextDebugData::setDebugDataForContentScript(targetContext, debugId); |
|
johnjbarton
2013/04/23 18:03:48
This will crash because the V8PerContextData objec
| |
| 82 } | 82 } |
| 83 | 83 |
| 84 PassOwnPtr<V8DOMWindowShell> V8DOMWindowShell::create(Frame* frame, PassRefPtr<D OMWrapperWorld> world, v8::Isolate* isolate) | 84 PassOwnPtr<V8DOMWindowShell> V8DOMWindowShell::create(Frame* frame, PassRefPtr<D OMWrapperWorld> world, v8::Isolate* isolate) |
| 85 { | 85 { |
| 86 return adoptPtr(new V8DOMWindowShell(frame, world, isolate)); | 86 return adoptPtr(new V8DOMWindowShell(frame, world, isolate)); |
| 87 } | 87 } |
| 88 | 88 |
| 89 V8DOMWindowShell::V8DOMWindowShell(Frame* frame, PassRefPtr<DOMWrapperWorld> wor ld, v8::Isolate* isolate) | 89 V8DOMWindowShell::V8DOMWindowShell(Frame* frame, PassRefPtr<DOMWrapperWorld> wor ld, v8::Isolate* isolate) |
| 90 : m_frame(frame) | 90 : m_frame(frame) |
| 91 , m_world(world) | 91 , m_world(world) |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 502 void V8DOMWindowShell::updateSecurityOrigin() | 502 void V8DOMWindowShell::updateSecurityOrigin() |
| 503 { | 503 { |
| 504 ASSERT(m_world->isMainWorld()); | 504 ASSERT(m_world->isMainWorld()); |
| 505 if (m_context.isEmpty()) | 505 if (m_context.isEmpty()) |
| 506 return; | 506 return; |
| 507 v8::HandleScope handleScope; | 507 v8::HandleScope handleScope; |
| 508 setSecurityToken(); | 508 setSecurityToken(); |
| 509 } | 509 } |
| 510 | 510 |
| 511 } // WebCore | 511 } // WebCore |
| OLD | NEW |