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

Unified Diff: extensions/renderer/declarative_event.cc

Issue 2843673002: [Extensions Bindings] Use gin::Arguments::GetAll() (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « extensions/renderer/chrome_setting.cc ('k') | extensions/renderer/storage_area.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/declarative_event.cc
diff --git a/extensions/renderer/declarative_event.cc b/extensions/renderer/declarative_event.cc
index 4e00229e1dbca93765355db5a9d52e906925d056..9365c8dbb23cd41cc8187db1bd5d8dba65d0cc67 100644
--- a/extensions/renderer/declarative_event.cc
+++ b/extensions/renderer/declarative_event.cc
@@ -174,13 +174,7 @@ void DeclarativeEvent::HandleFunction(const std::string& signature_name,
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = arguments->GetHolderCreationContext();
- // TODO(devlin): This pattern is getting common. We should probably pull it
- // out somewhere.
- std::vector<v8::Local<v8::Value>> argument_list;
- if (arguments->Length() > 0) {
- // Just copying handles should never fail.
- CHECK(arguments->GetRemaining(&argument_list));
- }
+ std::vector<v8::Local<v8::Value>> argument_list = arguments->GetAll();
// The events API has two undocumented parameters for each function: the name
// of the event, and the "webViewInstanceId". Currently, stub 0 for webview
« no previous file with comments | « extensions/renderer/chrome_setting.cc ('k') | extensions/renderer/storage_area.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698