Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: Source/core/inspector/InjectedScriptManager.cpp

Issue 556823003: Revert "Revert of [oilpan]: optimize the way we allocate persistent handles in wrappers. (patchset … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review feedback Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/inspector/InjectedScriptManager.h ('k') | Source/platform/heap/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 WrapperPersistent<InjectedScriptHost>::destroy(hostPtr);
49 }
50 #endif
51
45 PassOwnPtrWillBeRawPtr<InjectedScriptManager> InjectedScriptManager::createForPa ge() 52 PassOwnPtrWillBeRawPtr<InjectedScriptManager> InjectedScriptManager::createForPa ge()
46 { 53 {
47 return adoptPtrWillBeNoop(new InjectedScriptManager(&InjectedScriptManager:: canAccessInspectedWindow)); 54 return adoptPtrWillBeNoop(new InjectedScriptManager(&InjectedScriptManager:: canAccessInspectedWindow));
48 } 55 }
49 56
50 PassOwnPtrWillBeRawPtr<InjectedScriptManager> InjectedScriptManager::createForWo rker() 57 PassOwnPtrWillBeRawPtr<InjectedScriptManager> InjectedScriptManager::createForWo rker()
51 { 58 {
52 return adoptPtrWillBeNoop(new InjectedScriptManager(&InjectedScriptManager:: canAccessInspectedWorkerGlobalScope)); 59 return adoptPtrWillBeNoop(new InjectedScriptManager(&InjectedScriptManager:: canAccessInspectedWorkerGlobalScope));
53 } 60 }
54 61
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 188
182 int id = injectedScriptIdFor(inspectedScriptState); 189 int id = injectedScriptIdFor(inspectedScriptState);
183 ScriptValue injectedScriptValue = createInjectedScript(injectedScriptSource( ), inspectedScriptState, id); 190 ScriptValue injectedScriptValue = createInjectedScript(injectedScriptSource( ), inspectedScriptState, id);
184 InjectedScript result(injectedScriptValue, m_inspectedStateAccessCheck); 191 InjectedScript result(injectedScriptValue, m_inspectedStateAccessCheck);
185 m_idToInjectedScript.set(id, result); 192 m_idToInjectedScript.set(id, result);
186 return result; 193 return result;
187 } 194 }
188 195
189 } // namespace blink 196 } // namespace blink
190 197
OLDNEW
« no previous file with comments | « Source/core/inspector/InjectedScriptManager.h ('k') | Source/platform/heap/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698