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

Unified Diff: content/renderer/v8_value_converter_impl.cc

Issue 129153002: Make V8ValueConverterImpl serialize objects with internal field counts to an (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update test expectation Created 6 years, 11 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 | « chrome/test/data/extensions/api_test/executescript/callback/test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/v8_value_converter_impl.cc
diff --git a/content/renderer/v8_value_converter_impl.cc b/content/renderer/v8_value_converter_impl.cc
index 3b14bd576d1781665e1fdedf248375b2776c9b45..09fad30957dac631d2d38f61bcaeb310502a79bd 100644
--- a/content/renderer/v8_value_converter_impl.cc
+++ b/content/renderer/v8_value_converter_impl.cc
@@ -406,8 +406,11 @@ base::Value* V8ValueConverterImpl::FromV8Object(
//
// NOTE: check this after |strategy_| so that callers have a chance to
// do something else, such as convert to the node's name rather than NULL.
+ //
+ // ANOTHER NOTE: returning an empty dictionary here to minimise surprise.
+ // See also http://crbug.com/330559.
if (val->InternalFieldCount())
- return NULL;
+ return new base::DictionaryValue();
scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
v8::Handle<v8::Array> property_names(val->GetOwnPropertyNames());
« no previous file with comments | « chrome/test/data/extensions/api_test/executescript/callback/test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698