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

Side by Side Diff: Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp

Issue 717703002: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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/bindings/core/v8/V8Initializer.cpp ('k') | Source/core/dom/Document.cpp » ('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) 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void InjectedScriptManager::removeCallbackData(InjectedScriptManager::CallbackDa ta* callbackData) 58 void InjectedScriptManager::removeCallbackData(InjectedScriptManager::CallbackDa ta* callbackData)
59 { 59 {
60 ASSERT(m_callbackDataSet.contains(callbackData)); 60 ASSERT(m_callbackDataSet.contains(callbackData));
61 m_callbackDataSet.remove(callbackData); 61 m_callbackDataSet.remove(callbackData);
62 } 62 }
63 63
64 static v8::Local<v8::Object> createInjectedScriptHostV8Wrapper(PassRefPtrWillBeR awPtr<InjectedScriptHost> host, InjectedScriptManager* injectedScriptManager, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate) 64 static v8::Local<v8::Object> createInjectedScriptHostV8Wrapper(PassRefPtrWillBeR awPtr<InjectedScriptHost> host, InjectedScriptManager* injectedScriptManager, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate)
65 { 65 {
66 ASSERT(host); 66 ASSERT(host);
67 67
68 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &V8InjectedScriptHost::wrapperTypeInfo, host->toScriptWrappableBase(), isolate ); 68 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(isolate, creati onContext, &V8InjectedScriptHost::wrapperTypeInfo, host->toScriptWrappableBase() );
69 if (UNLIKELY(wrapper.IsEmpty())) 69 if (UNLIKELY(wrapper.IsEmpty()))
70 return wrapper; 70 return wrapper;
71 71
72 // Create a weak reference to the v8 wrapper of InspectorBackend to deref 72 // Create a weak reference to the v8 wrapper of InspectorBackend to deref
73 // InspectorBackend when the wrapper is garbage collected. 73 // InspectorBackend when the wrapper is garbage collected.
74 InjectedScriptManager::CallbackData* callbackData = injectedScriptManager->c reateCallbackData(injectedScriptManager); 74 InjectedScriptManager::CallbackData* callbackData = injectedScriptManager->c reateCallbackData(injectedScriptManager);
75 callbackData->host = host.get(); 75 callbackData->host = host.get();
76 callbackData->handle.set(isolate, wrapper); 76 callbackData->handle.set(isolate, wrapper);
77 callbackData->handle.setWeak(callbackData, &InjectedScriptManager::setWeakCa llback); 77 callbackData->handle.setWeak(callbackData, &InjectedScriptManager::setWeakCa llback);
78 78
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 return BindingSecurity::shouldAllowAccessToFrame(scriptState->isolate(), fra me, DoNotReportSecurityError); 123 return BindingSecurity::shouldAllowAccessToFrame(scriptState->isolate(), fra me, DoNotReportSecurityError);
124 } 124 }
125 125
126 void InjectedScriptManager::setWeakCallback(const v8::WeakCallbackData<v8::Objec t, InjectedScriptManager::CallbackData>& data) 126 void InjectedScriptManager::setWeakCallback(const v8::WeakCallbackData<v8::Objec t, InjectedScriptManager::CallbackData>& data)
127 { 127 {
128 InjectedScriptManager::CallbackData* callbackData = data.GetParameter(); 128 InjectedScriptManager::CallbackData* callbackData = data.GetParameter();
129 callbackData->injectedScriptManager->removeCallbackData(callbackData); 129 callbackData->injectedScriptManager->removeCallbackData(callbackData);
130 } 130 }
131 131
132 } // namespace blink 132 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8Initializer.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698