Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 #include "core/inspector/InjectedScript.h" | 35 #include "core/inspector/InjectedScript.h" |
| 36 #include "core/inspector/InjectedScriptHost.h" | 36 #include "core/inspector/InjectedScriptHost.h" |
| 37 #include "core/inspector/JSONParser.h" | 37 #include "core/inspector/JSONParser.h" |
| 38 #include "platform/JSONValues.h" | 38 #include "platform/JSONValues.h" |
| 39 #include "public/platform/Platform.h" | 39 #include "public/platform/Platform.h" |
| 40 #include "public/platform/WebData.h" | 40 #include "public/platform/WebData.h" |
| 41 #include "wtf/PassOwnPtr.h" | 41 #include "wtf/PassOwnPtr.h" |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 #if ENABLE(OILPAN) | |
| 46 InjectedScriptManager::CallbackData::~CallbackData() | |
| 47 { | |
| 48 if (hostPtr) | |
|
Mads Ager (chromium)
2014/09/01 13:52:45
No need to check, delete ignores null ptrs.
wibling-chromium
2014/09/02 11:19:37
Done.
| |
| 49 delete hostPtr; | |
| 50 } | |
| 51 #endif | |
| 52 | |
| 45 PassOwnPtrWillBeRawPtr<InjectedScriptManager> InjectedScriptManager::createForPa ge() | 53 PassOwnPtrWillBeRawPtr<InjectedScriptManager> InjectedScriptManager::createForPa ge() |
| 46 { | 54 { |
| 47 return adoptPtrWillBeNoop(new InjectedScriptManager(&InjectedScriptManager:: canAccessInspectedWindow)); | 55 return adoptPtrWillBeNoop(new InjectedScriptManager(&InjectedScriptManager:: canAccessInspectedWindow)); |
| 48 } | 56 } |
| 49 | 57 |
| 50 PassOwnPtrWillBeRawPtr<InjectedScriptManager> InjectedScriptManager::createForWo rker() | 58 PassOwnPtrWillBeRawPtr<InjectedScriptManager> InjectedScriptManager::createForWo rker() |
| 51 { | 59 { |
| 52 return adoptPtrWillBeNoop(new InjectedScriptManager(&InjectedScriptManager:: canAccessInspectedWorkerGlobalScope)); | 60 return adoptPtrWillBeNoop(new InjectedScriptManager(&InjectedScriptManager:: canAccessInspectedWorkerGlobalScope)); |
| 53 } | 61 } |
| 54 | 62 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 181 | 189 |
| 182 int id = injectedScriptIdFor(inspectedScriptState); | 190 int id = injectedScriptIdFor(inspectedScriptState); |
| 183 ScriptValue injectedScriptValue = createInjectedScript(injectedScriptSource( ), inspectedScriptState, id); | 191 ScriptValue injectedScriptValue = createInjectedScript(injectedScriptSource( ), inspectedScriptState, id); |
| 184 InjectedScript result(injectedScriptValue, m_inspectedStateAccessCheck); | 192 InjectedScript result(injectedScriptValue, m_inspectedStateAccessCheck); |
| 185 m_idToInjectedScript.set(id, result); | 193 m_idToInjectedScript.set(id, result); |
| 186 return result; | 194 return result; |
| 187 } | 195 } |
| 188 | 196 |
| 189 } // namespace blink | 197 } // namespace blink |
| 190 | 198 |
| OLD | NEW |