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

Unified Diff: Source/bindings/tests/results/core/V8TestSpecialOperations.cpp

Issue 1019773006: use non-masking, string interceptors in generated bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix test Created 5 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: Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
diff --git a/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp b/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
index 6217dd8d96ea4b4cc2a4b2c158a5d0c40d3c0c4e..e741ce83caacbd42b504f0c33a19c22e2d8b2cda 100644
--- a/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
+++ b/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
@@ -63,8 +63,6 @@ static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- if (!name->IsString())
- return;
auto nameString = name.As<v8::String>();
TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder());
AtomicString propertyName = toCoreAtomicString(nameString);
@@ -84,8 +82,6 @@ static void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::Prop
static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- if (!name->IsString())
- return;
auto nameString = name.As<v8::String>();
TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder());
V8StringResource<> propertyName(nameString);
@@ -112,8 +108,6 @@ static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
{
- if (!name->IsString())
- return;
TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder());
AtomicString propertyName = toCoreAtomicString(name.As<v8::String>());
v8::String::Utf8Value namedProperty(name);
@@ -175,6 +169,7 @@ static void installV8TestSpecialOperationsTemplate(v8::Local<v8::FunctionTemplat
ALLOW_UNUSED_LOCAL(prototypeTemplate);
{
v8::NamedPropertyHandlerConfiguration config(TestSpecialOperationsV8Internal::namedPropertyGetterCallback, TestSpecialOperationsV8Internal::namedPropertySetterCallback, TestSpecialOperationsV8Internal::namedPropertyQueryCallback, 0, TestSpecialOperationsV8Internal::namedPropertyEnumeratorCallback);
+ config.flags = static_cast<v8::PropertyHandlerFlags>(static_cast<int>(config.flags) | static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStrings));
functionTemplate->InstanceTemplate()->SetHandler(config);
}

Powered by Google App Engine
This is Rietveld 408576698