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

Unified Diff: ppapi/tests/blink_deprecated_test_plugin.cc

Issue 1813823002: Handle the case where the v8 scriptable object has a property defined with value undefined. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use shouldBeTrue in layout test and defines testGetUndefined in blink_deprecated_test_plugin.cc Created 4 years, 9 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
Index: ppapi/tests/blink_deprecated_test_plugin.cc
diff --git a/ppapi/tests/blink_deprecated_test_plugin.cc b/ppapi/tests/blink_deprecated_test_plugin.cc
index e179bc7800555b84ae4f1b8258e1efccbc7af3a6..229e8c23f12776d4508627ce1f412116e0b07e94 100644
--- a/ppapi/tests/blink_deprecated_test_plugin.cc
+++ b/ppapi/tests/blink_deprecated_test_plugin.cc
@@ -137,6 +137,9 @@ class InstanceSO : public ScriptableBase {
properties_.insert(std::make_pair(
"testObject", base::Bind(&InstanceSO::TestObjectAccessor,
base::Unretained(this))));
+ properties_.insert(std::make_pair(
+ "testGetUndefined", base::Bind(&InstanceSO::TestGetUndefinedAccessor,
+ base::Unretained(this))));
}
~InstanceSO() override {}
@@ -190,6 +193,12 @@ class InstanceSO : public ScriptableBase {
*var = test_object_;
}
+ void TestGetUndefinedAccessor(bool set, pp::Var* var) {
+ if (set)
+ return;
+ *var = pp::Var();
+ }
+
pp::VarPrivate test_object_;
};

Powered by Google App Engine
This is Rietveld 408576698