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

Side by Side Diff: Source/bindings/v8/ScriptFunctionCall.cpp

Issue 23619034: Pass isolate to v8::False() / v8::True() when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update more places Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 void ScriptCallArgumentHandler::appendArgument(int argument) 98 void ScriptCallArgumentHandler::appendArgument(int argument)
99 { 99 {
100 ScriptScope scope(m_scriptState); 100 ScriptScope scope(m_scriptState);
101 m_arguments.append(v8::Number::New(m_scriptState->isolate(), argument)); 101 m_arguments.append(v8::Number::New(m_scriptState->isolate(), argument));
102 } 102 }
103 103
104 void ScriptCallArgumentHandler::appendArgument(bool argument) 104 void ScriptCallArgumentHandler::appendArgument(bool argument)
105 { 105 {
106 m_arguments.append(v8Boolean(argument)); 106 m_arguments.append(v8Boolean(argument, m_scriptState->isolate()));
107 } 107 }
108 108
109 ScriptFunctionCall::ScriptFunctionCall(const ScriptObject& thisObject, const Str ing& name) 109 ScriptFunctionCall::ScriptFunctionCall(const ScriptObject& thisObject, const Str ing& name)
110 : ScriptCallArgumentHandler(thisObject.scriptState()) 110 : ScriptCallArgumentHandler(thisObject.scriptState())
111 , m_thisObject(thisObject) 111 , m_thisObject(thisObject)
112 , m_name(name) 112 , m_name(name)
113 { 113 {
114 } 114 }
115 115
116 ScriptValue ScriptFunctionCall::call(bool& hadException, bool reportExceptions) 116 ScriptValue ScriptFunctionCall::call(bool& hadException, bool reportExceptions)
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 OwnArrayPtr<v8::Handle<v8::Value> > args = adoptArrayPtr(new v8::Handle<v8:: Value>[m_arguments.size()]); 194 OwnArrayPtr<v8::Handle<v8::Value> > args = adoptArrayPtr(new v8::Handle<v8:: Value>[m_arguments.size()]);
195 for (size_t i = 0; i < m_arguments.size(); ++i) 195 for (size_t i = 0; i < m_arguments.size(); ++i)
196 args[i] = m_arguments[i].v8Value(); 196 args[i] = m_arguments[i].v8Value();
197 197
198 v8::Handle<v8::Value> result = ScriptController::callFunctionWithInstrumenta tion(0, function, object, m_arguments.size(), args.get(), m_scriptState->isolate ()); 198 v8::Handle<v8::Value> result = ScriptController::callFunctionWithInstrumenta tion(0, function, object, m_arguments.size(), args.get(), m_scriptState->isolate ());
199 return ScriptValue(result); 199 return ScriptValue(result);
200 } 200 }
201 201
202 } // namespace WebCore 202 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/CustomElementConstructorBuilder.cpp ('k') | Source/bindings/v8/V8ScriptRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698