| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 4 * Copyright (C) 2012 Google Inc. All rights reserved. | 4 * Copyright (C) 2012 Google Inc. 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 | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 { | 61 { |
| 62 } | 62 } |
| 63 | 63 |
| 64 InjectedScriptManager::~InjectedScriptManager() | 64 InjectedScriptManager::~InjectedScriptManager() |
| 65 { | 65 { |
| 66 } | 66 } |
| 67 | 67 |
| 68 DEFINE_TRACE(InjectedScriptManager) | 68 DEFINE_TRACE(InjectedScriptManager) |
| 69 { | 69 { |
| 70 visitor->trace(m_injectedScriptHost); | 70 visitor->trace(m_injectedScriptHost); |
| 71 #if ENABLE(OILPAN) | |
| 72 visitor->trace(m_callbackDataSet); | |
| 73 #endif | |
| 74 } | 71 } |
| 75 | 72 |
| 76 void InjectedScriptManager::disconnect() | 73 void InjectedScriptManager::disconnect() |
| 77 { | 74 { |
| 78 m_injectedScriptHost->disconnect(); | 75 m_injectedScriptHost->disconnect(); |
| 79 m_injectedScriptHost.clear(); | 76 m_injectedScriptHost.clear(); |
| 80 } | 77 } |
| 81 | 78 |
| 82 InjectedScriptHost* InjectedScriptManager::injectedScriptHost() | 79 InjectedScriptHost* InjectedScriptManager::injectedScriptHost() |
| 83 { | 80 { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 int id = injectedScriptIdFor(inspectedScriptState); | 178 int id = injectedScriptIdFor(inspectedScriptState); |
| 182 RefPtr<InjectedScriptNative> injectedScriptNative = adoptRef(new InjectedScr
iptNative(inspectedScriptState->isolate())); | 179 RefPtr<InjectedScriptNative> injectedScriptNative = adoptRef(new InjectedScr
iptNative(inspectedScriptState->isolate())); |
| 183 ScriptValue injectedScriptValue = createInjectedScript(injectedScriptSource(
), inspectedScriptState, id, injectedScriptNative.get()); | 180 ScriptValue injectedScriptValue = createInjectedScript(injectedScriptSource(
), inspectedScriptState, id, injectedScriptNative.get()); |
| 184 InjectedScript result(injectedScriptValue, m_inspectedStateAccessCheck, inje
ctedScriptNative.release()); | 181 InjectedScript result(injectedScriptValue, m_inspectedStateAccessCheck, inje
ctedScriptNative.release()); |
| 185 if (m_customObjectFormatterEnabled) | 182 if (m_customObjectFormatterEnabled) |
| 186 result.setCustomObjectFormatterEnabled(m_customObjectFormatterEnabled); | 183 result.setCustomObjectFormatterEnabled(m_customObjectFormatterEnabled); |
| 187 m_idToInjectedScript.set(id, result); | 184 m_idToInjectedScript.set(id, result); |
| 188 return result; | 185 return result; |
| 189 } | 186 } |
| 190 | 187 |
| 191 PassOwnPtrWillBeRawPtr<InjectedScriptManager::CallbackData> InjectedScriptManage
r::CallbackData::create(InjectedScriptManager* manager) | |
| 192 { | |
| 193 return adoptPtrWillBeNoop(new CallbackData(manager)); | |
| 194 } | |
| 195 | |
| 196 InjectedScriptManager::CallbackData::CallbackData(InjectedScriptManager* manager
) | |
| 197 : injectedScriptManager(manager) | |
| 198 { | |
| 199 } | |
| 200 | |
| 201 void InjectedScriptManager::CallbackData::dispose() | |
| 202 { | |
| 203 // Promptly release the ScopedPersistent<>. | |
| 204 handle.clear(); | |
| 205 } | |
| 206 | |
| 207 DEFINE_TRACE(InjectedScriptManager::CallbackData) | |
| 208 { | |
| 209 visitor->trace(host); | |
| 210 visitor->trace(injectedScriptManager); | |
| 211 } | |
| 212 | |
| 213 } // namespace blink | 188 } // namespace blink |
| OLD | NEW |