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

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

Issue 54283002: Rename |args| to |info| in V8 bindings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/V8NPObject.cpp ('k') | Source/bindings/v8/V8ObjectConstructor.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) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 callback = v8::Handle<v8::Function>::Cast(filter); 70 callback = v8::Handle<v8::Function>::Cast(filter);
71 else { 71 else {
72 v8::Local<v8::Value> value = filter->ToObject()->Get(v8::String::NewSymb ol("acceptNode")); 72 v8::Local<v8::Value> value = filter->ToObject()->Get(v8::String::NewSymb ol("acceptNode"));
73 if (!value->IsFunction()) { 73 if (!value->IsFunction()) {
74 throwTypeError("NodeFilter object does not have an acceptNode functi on", state->isolate()); 74 throwTypeError("NodeFilter object does not have an acceptNode functi on", state->isolate());
75 return NodeFilter::FILTER_REJECT; 75 return NodeFilter::FILTER_REJECT;
76 } 76 }
77 callback = v8::Handle<v8::Function>::Cast(value); 77 callback = v8::Handle<v8::Function>::Cast(value);
78 } 78 }
79 79
80 OwnPtr<v8::Handle<v8::Value>[]> args = adoptArrayPtr(new v8::Handle<v8::Valu e>[1]); 80 OwnPtr<v8::Handle<v8::Value>[]> info = adoptArrayPtr(new v8::Handle<v8::Valu e>[1]);
81 args[0] = toV8(node, v8::Handle<v8::Object>(), state->isolate()); 81 info[0] = toV8(node, v8::Handle<v8::Object>(), state->isolate());
82 82
83 v8::Handle<v8::Object> object = v8::Context::GetCurrent()->Global(); 83 v8::Handle<v8::Object> object = v8::Context::GetCurrent()->Global();
84 v8::Handle<v8::Value> result = ScriptController::callFunction(state->executi onContext(), callback, object, 1, args.get(), isolate); 84 v8::Handle<v8::Value> result = ScriptController::callFunction(state->executi onContext(), callback, object, 1, info.get(), isolate);
85 85
86 if (exceptionCatcher.HasCaught()) { 86 if (exceptionCatcher.HasCaught()) {
87 state->setException(exceptionCatcher.Exception()); 87 state->setException(exceptionCatcher.Exception());
88 return NodeFilter::FILTER_REJECT; 88 return NodeFilter::FILTER_REJECT;
89 } 89 }
90 90
91 ASSERT(!result.IsEmpty()); 91 ASSERT(!result.IsEmpty());
92 92
93 return result->Int32Value(); 93 return result->Int32Value();
94 } 94 }
95 95
96 void V8NodeFilterCondition::makeWeakCallback(v8::Isolate*, v8::Persistent<v8::Va lue>*, V8NodeFilterCondition* condition) 96 void V8NodeFilterCondition::makeWeakCallback(v8::Isolate*, v8::Persistent<v8::Va lue>*, V8NodeFilterCondition* condition)
97 { 97 {
98 condition->m_filter.clear(); 98 condition->m_filter.clear();
99 } 99 }
100 100
101 } // namespace WebCore 101 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8NPObject.cpp ('k') | Source/bindings/v8/V8ObjectConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698