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

Unified Diff: Source/bindings/core/v8/ScheduledAction.cpp

Issue 721033004: Implement WindowTimers.set{Timeout,Interval} without [Custom] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-overload-with-variadic
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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/core/v8/ScheduledAction.cpp
diff --git a/Source/bindings/core/v8/ScheduledAction.cpp b/Source/bindings/core/v8/ScheduledAction.cpp
index 6bf05b28483612ae10d66ee256af97b7912ee89d..124537569d6faa19c609552d9229522da6329201 100644
--- a/Source/bindings/core/v8/ScheduledAction.cpp
+++ b/Source/bindings/core/v8/ScheduledAction.cpp
@@ -46,15 +46,16 @@
namespace blink {
-ScheduledAction::ScheduledAction(ScriptState* scriptState, v8::Handle<v8::Function> function, int argc, v8::Handle<v8::Value> argv[], v8::Isolate* isolate)
+ScheduledAction::ScheduledAction(ScriptState* scriptState, const ScriptValue& function, const Vector<ScriptValue>& arguments, v8::Isolate* isolate)
haraken 2014/11/13 12:59:31 You can drop the v8::Isolate* parameter, since you
Jens Widell 2014/11/13 13:26:48 Done.
: m_scriptState(scriptState)
- , m_function(isolate, function)
, m_info(isolate)
, m_code(String(), KURL(), TextPosition::belowRangePosition())
{
- m_info.ReserveCapacity(argc);
- for (int i = 0; i < argc; ++i)
- m_info.Append(argv[i]);
+ ASSERT(function.isFunction());
+ m_function.set(isolate, v8::Handle<v8::Function>::Cast(function.v8Value()));
+ m_info.ReserveCapacity(arguments.size());
+ for (const ScriptValue& argument : arguments)
+ m_info.Append(argument.v8Value());
}
ScheduledAction::ScheduledAction(ScriptState* scriptState, const String& code, const KURL& url, v8::Isolate* isolate)

Powered by Google App Engine
This is Rietveld 408576698