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

Unified Diff: chrome/renderer/extensions/send_request_natives.cc

Issue 10387055: Support optional arguments in SendRequestNatives::StartRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed John's comments Created 8 years, 7 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 | « no previous file | content/public/renderer/v8_value_converter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/send_request_natives.cc
diff --git a/chrome/renderer/extensions/send_request_natives.cc b/chrome/renderer/extensions/send_request_natives.cc
index 17e0ba995ade2e7239de66a92c9b399532f05e0f..5bf48e5f3c3bc2f175cffbebf4ae6b95a6b4ec70 100644
--- a/chrome/renderer/extensions/send_request_natives.cc
+++ b/chrome/renderer/extensions/send_request_natives.cc
@@ -41,6 +41,7 @@ v8::Handle<v8::Value> SendRequestNatives::StartRequest(
bool for_io_thread = args[4]->BooleanValue();
scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create());
+ converter->SetUndefinedAllowed(true); // Allow passing optional values.
scoped_ptr<Value> value_args(
converter->FromV8Value(args[1], v8::Context::GetCurrent()));
if (!value_args.get() || !value_args->IsType(Value::TYPE_LIST)) {
« no previous file with comments | « no previous file | content/public/renderer/v8_value_converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698