OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 23 matching lines...) Expand all Loading... |
34 #include "bindings/core/v8/V8InjectedScriptHost.h" | 34 #include "bindings/core/v8/V8InjectedScriptHost.h" |
35 #include "bindings/core/v8/V8Window.h" | 35 #include "bindings/core/v8/V8Window.h" |
36 #include "bindings/v8/BindingSecurity.h" | 36 #include "bindings/v8/BindingSecurity.h" |
37 #include "bindings/v8/ScopedPersistent.h" | 37 #include "bindings/v8/ScopedPersistent.h" |
38 #include "bindings/v8/ScriptDebugServer.h" | 38 #include "bindings/v8/ScriptDebugServer.h" |
39 #include "bindings/v8/ScriptValue.h" | 39 #include "bindings/v8/ScriptValue.h" |
40 #include "bindings/v8/V8Binding.h" | 40 #include "bindings/v8/V8Binding.h" |
41 #include "bindings/v8/V8ObjectConstructor.h" | 41 #include "bindings/v8/V8ObjectConstructor.h" |
42 #include "bindings/v8/V8ScriptRunner.h" | 42 #include "bindings/v8/V8ScriptRunner.h" |
43 #include "core/inspector/InjectedScriptHost.h" | 43 #include "core/inspector/InjectedScriptHost.h" |
44 #include "core/frame/DOMWindow.h" | 44 #include "core/frame/LocalDOMWindow.h" |
45 #include "wtf/RefPtr.h" | 45 #include "wtf/RefPtr.h" |
46 | 46 |
47 namespace WebCore { | 47 namespace WebCore { |
48 | 48 |
49 struct InjectedScriptManager::CallbackData { | 49 struct InjectedScriptManager::CallbackData { |
50 ScopedPersistent<v8::Object> handle; | 50 ScopedPersistent<v8::Object> handle; |
51 RefPtr<InjectedScriptHost> host; | 51 RefPtr<InjectedScriptHost> host; |
52 }; | 52 }; |
53 | 53 |
54 static v8::Local<v8::Object> createInjectedScriptHostV8Wrapper(InjectedScriptHos
t* host, v8::Isolate* isolate) | 54 static v8::Local<v8::Object> createInjectedScriptHostV8Wrapper(InjectedScriptHos
t* host, v8::Isolate* isolate) |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 | 117 |
118 void InjectedScriptManager::setWeakCallback(const v8::WeakCallbackData<v8::Objec
t, InjectedScriptManager::CallbackData>& data) | 118 void InjectedScriptManager::setWeakCallback(const v8::WeakCallbackData<v8::Objec
t, InjectedScriptManager::CallbackData>& data) |
119 { | 119 { |
120 data.GetParameter()->handle.clear(); | 120 data.GetParameter()->handle.clear(); |
121 data.GetParameter()->host.clear(); | 121 data.GetParameter()->host.clear(); |
122 delete data.GetParameter(); | 122 delete data.GetParameter(); |
123 } | 123 } |
124 | 124 |
125 } // namespace WebCore | 125 } // namespace WebCore |
OLD | NEW |