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

Unified Diff: gin/object_template_builder.cc

Issue 467243002: [gin] Allow interceptors to signal whether a they intercepted something (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « gin/interceptor_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/object_template_builder.cc
diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc
index 603166cfabff1edb2a964bbdce3fa2d79edc2b53..f649d34a9ff2f2d9518ca29913d778700c4b3fcc 100644
--- a/gin/object_template_builder.cc
+++ b/gin/object_template_builder.cc
@@ -69,7 +69,8 @@ void NamedPropertySetter(v8::Local<v8::String> property,
return;
std::string name;
ConvertFromV8(isolate, property, &name);
- interceptor->SetNamedProperty(isolate, name, value);
+ if (interceptor->SetNamedProperty(isolate, name, value))
+ info.GetReturnValue().Set(value);
}
void NamedPropertyQuery(v8::Local<v8::String> property,
@@ -114,7 +115,8 @@ void IndexedPropertySetter(uint32_t index,
IndexedInterceptorFromV8(isolate, info.Holder());
if (!interceptor)
return;
- interceptor->SetIndexedProperty(isolate, index, value);
+ if (interceptor->SetIndexedProperty(isolate, index, value))
+ info.GetReturnValue().Set(value);
}
void IndexedPropertyEnumerator(
« no previous file with comments | « gin/interceptor_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698