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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptFunction.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "bindings/core/v8/ScriptFunction.h" 5 #include "bindings/core/v8/ScriptFunction.h"
6 6
7 #include "bindings/core/v8/V8Binding.h" 7 #include "bindings/core/v8/V8Binding.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 v8::Local<v8::Function> ScriptFunction::bindToV8Function() 11 v8::Local<v8::Function> ScriptFunction::bindToV8Function()
12 { 12 {
13 v8::Isolate* isolate = m_scriptState->isolate(); 13 v8::Isolate* isolate = m_scriptState->isolate();
14 v8::Local<v8::External> wrapper = v8::External::New(isolate, this); 14 v8::Local<v8::External> wrapper = v8::External::New(isolate, this);
15 m_scriptState->world().registerDOMObjectHolder(isolate, this, wrapper); 15 m_scriptState->world().registerDOMObjectHolder(isolate, this, wrapper);
16 return createClosure(&ScriptFunction::callCallback, wrapper, isolate); 16 return createClosure(&ScriptFunction::callCallback, wrapper, isolate);
17 } 17 }
18 18
19 void ScriptFunction::callCallback(const v8::FunctionCallbackInfo<v8::Value>& arg s) 19 void ScriptFunction::callCallback(const v8::FunctionCallbackInfo<v8::Value>& arg s)
20 { 20 {
21 ASSERT(args.Data()->IsExternal()); 21 ASSERT(args.Data()->IsExternal());
22 ScriptFunction* scriptFunction = static_cast<ScriptFunction*>(v8::Local<v8:: External>::Cast(args.Data())->Value()); 22 ScriptFunction* scriptFunction = static_cast<ScriptFunction*>(v8::Local<v8:: External>::Cast(args.Data())->Value());
23 ScriptValue result = scriptFunction->call(ScriptValue(scriptFunction->script State(), args[0])); 23 ScriptValue result = scriptFunction->call(ScriptValue(scriptFunction->getScr iptState(), args[0]));
24 v8SetReturnValue(args, result.v8Value()); 24 v8SetReturnValue(args, result.v8Value());
25 } 25 }
26 26
27 } // namespace blink 27 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698