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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp

Issue 2084183004: Only access a plugin's scriptable object, and not also its prototype chain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
index b277398c70ac6f3bc14a2e8f51180d0fc513556a..b484a5ecaec4e91967a965a68935be2848338d78 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
@@ -53,13 +53,11 @@ void getScriptableObjectProperty(PropertyType property, const v8::PropertyCallba
if (instance.IsEmpty())
return;
- v8::Local<v8::Value> value;
- if (!instance->Get(info.GetIsolate()->GetCurrentContext(), property).ToLocal(&value))
+ if (!v8CallBoolean(instance->HasOwnProperty(info.GetIsolate()->GetCurrentContext(), property)))
return;
- // We quit here to allow the binding code to look up general HTMLObjectElement properties
- // if they are not overriden by plugin.
- if (value->IsUndefined() && !v8CallBoolean(instance->Has(info.GetIsolate()->GetCurrentContext(), property)))
+ v8::Local<v8::Value> value;
+ if (!instance->Get(info.GetIsolate()->GetCurrentContext(), property).ToLocal(&value))
return;
v8SetReturnValue(info, value);
@@ -87,8 +85,7 @@ void setScriptableObjectProperty(PropertyType property, v8::Local<v8::Value> val
// DOM element will also be set. For plugin's that don't intercept the call
// (all except gTalk) this makes no difference at all. For gTalk the fact
// that the property on the DOM element also gets set is inconsequential.
- v8::Maybe<bool> unused = instance->Set(info.GetIsolate()->GetCurrentContext(), property, value);
- ALLOW_UNUSED_LOCAL(unused);
+ v8CallBoolean(instance->CreateDataProperty(info.GetIsolate()->GetCurrentContext(), property, value));
}
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698