Chromium Code Reviews| Index: Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp |
| diff --git a/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp b/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp |
| index b43dace9a5bbdcf09199b2a4d0ea04b6f89552b9..687473e47b45ce1300a75c6d9647f9eb88a9aad3 100644 |
| --- a/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp |
| +++ b/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp |
| @@ -199,9 +199,23 @@ void V8CSSStyleDeclaration::namedPropertyGetterCustom(v8::Local<v8::Name> name, |
| { |
| if (!name->IsString()) |
| return; |
| + auto nameString = name.As<v8::String>(); |
| + auto context = info.GetIsolate()->GetCurrentContext(); |
| // First look for API defined attributes on the style declaration object. |
| - if (v8CallBoolean(info.Holder()->HasRealNamedCallbackProperty(info.GetIsolate()->GetCurrentContext(), name.As<v8::String>()))) |
| + if (v8CallBoolean(info.Holder()->HasRealNamedCallbackProperty(context, nameString))) |
| return; |
| + { |
| + v8::Local<v8::Value> returnValue; |
| + v8::TryCatch tryCatch; |
| + if (v8Call(info.Holder()->GetRealNamedPropertyInPrototypeChain(context, nameString), returnValue, tryCatch)) { |
|
bashi
2015/04/07 08:44:56
I read the following comment on GetRealNamedProper
Yuki
2015/04/07 09:29:00
I think that it is an intended behavior that GetRe
|
| + v8SetReturnValue(info, returnValue); |
| + return; |
| + } |
| + if (tryCatch.HasCaught()) { |
| + tryCatch.ReThrow(); |
| + return; |
| + } |
| + } |
| // Search the style declaration. |
| CSSPropertyInfo* propInfo = cssPropertyInfo(name.As<v8::String>(), info.GetIsolate()); |