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

Unified Diff: Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp

Issue 54283002: Rename |args| to |info| in V8 bindings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp
diff --git a/Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp b/Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp
index 9d36686633fd3508a43197c34110efddc3fc8ace..124a4f55d6856e34d45eaf61a98cb2521da4d982 100644
--- a/Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp
+++ b/Source/bindings/v8/custom/V8HTMLDocumentCustom.cpp
@@ -52,37 +52,37 @@ namespace WebCore {
// HTMLDocument ----------------------------------------------------------------
-// Concatenates "args" to a string. If args is empty, returns empty string.
+// Concatenates "info" to a string. If info is empty, returns empty string.
// Firefox/Safari/IE support non-standard arguments to document.write, ex:
// document.write("a", "b", "c") --> document.write("abc")
// document.write() --> document.write("")
-static String writeHelperGetString(const v8::FunctionCallbackInfo<v8::Value>& args)
+static String writeHelperGetString(const v8::FunctionCallbackInfo<v8::Value>& info)
{
StringBuilder builder;
- for (int i = 0; i < args.Length(); ++i) {
- V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringArgument, args[i], String());
+ for (int i = 0; i < info.Length(); ++i) {
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringArgument, info[i], String());
builder.append(stringArgument);
}
return builder.toString();
}
-void V8HTMLDocument::writeMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
+void V8HTMLDocument::writeMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder());
- htmlDocument->write(writeHelperGetString(args), activeDOMWindow()->document());
+ HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder());
+ htmlDocument->write(writeHelperGetString(info), activeDOMWindow()->document());
}
-void V8HTMLDocument::writelnMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
+void V8HTMLDocument::writelnMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder());
- htmlDocument->writeln(writeHelperGetString(args), activeDOMWindow()->document());
+ HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder());
+ htmlDocument->writeln(writeHelperGetString(info), activeDOMWindow()->document());
}
-void V8HTMLDocument::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
+void V8HTMLDocument::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder());
+ HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder());
- if (args.Length() > 2) {
+ if (info.Length() > 2) {
if (RefPtr<Frame> frame = htmlDocument->frame()) {
// Fetch the global object for the frame.
v8::Local<v8::Context> context = frame->script().currentWorldContext();
@@ -94,21 +94,21 @@ void V8HTMLDocument::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
v8::Local<v8::Value> function = global->Get(v8::String::NewSymbol("open"));
// If the open property is not a function throw a type error.
if (!function->IsFunction()) {
- throwTypeError("open is not a function", args.GetIsolate());
+ throwTypeError("open is not a function", info.GetIsolate());
return;
}
// Wrap up the arguments and call the function.
- OwnPtr<v8::Local<v8::Value>[]> params = adoptArrayPtr(new v8::Local<v8::Value>[args.Length()]);
- for (int i = 0; i < args.Length(); i++)
- params[i] = args[i];
+ OwnPtr<v8::Local<v8::Value>[]> params = adoptArrayPtr(new v8::Local<v8::Value>[info.Length()]);
+ for (int i = 0; i < info.Length(); i++)
+ params[i] = info[i];
- v8SetReturnValue(args, frame->script().callFunction(v8::Local<v8::Function>::Cast(function), global, args.Length(), params.get()));
+ v8SetReturnValue(info, frame->script().callFunction(v8::Local<v8::Function>::Cast(function), global, info.Length(), params.get()));
return;
}
}
htmlDocument->open(activeDOMWindow()->document());
- v8SetReturnValue(args, args.Holder());
+ v8SetReturnValue(info, info.Holder());
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698