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

Issue 1813823002: Handle the case where the v8 scriptable object has a property defined with value undefined. (Closed)

Created:
4 years, 9 months ago by Julien Isorce Samsung
Modified:
4 years, 8 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle the case where the v8 scriptable object has a property defined with value undefined. Or with a getter that returns undefined. Indeed V8HTMLPlugInElementCustom::getScriptableObjectProperty should only fallback to the general HTMLObjectElement if a property does not exist. For example if the v8 scriptable object has some properties defined as equivalent as the following: Object.defineProperty( scriptableObj, "onFoo", { value: undefined // default } ); or Object.defineProperty( scriptableObj, "bar", { get: function () { return undefined; } } ); Then myHTMLObjectElement.hasOwnProperty("onFoo") or myHTMLObjectElement.hasOwnProperty("bar") will return false whereas they should return true. BUG=596495 R=bashi@chromium.org, dcheng@chromium.org, haraken@chromium.org, piman@chromium.org Committed: https://crrev.com/9e08bcbbb080114780f7d37ff4d9f3946e59d651 Cr-Commit-Position: refs/heads/master@{#383296}

Patch Set 1 #

Patch Set 2 : Add layout test #

Patch Set 3 : #

Total comments: 3

Patch Set 4 : #

Total comments: 1

Patch Set 5 : Use shouldBeTrue in layout test and defines testGetUndefined in blink_deprecated_test_plugin.cc #

Total comments: 1

Patch Set 6 : #

Total comments: 1

Patch Set 7 : Add doc and use v8CallBoolean instead of FromJust() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -1 line) Patch
M ppapi/tests/blink_deprecated_test_plugin.cc View 1 2 3 4 5 6 3 chunks +11 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html View 1 2 3 4 5 1 chunk +21 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/plugins/plugin-scriptable-expected.txt View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 52 (17 generated)
Julien Isorce Samsung
Hi, I checked : CHROME_DEVEL_SANDBOX=out/Release/chrome_sandbox python third_party/WebKit/Tools/Scripts/run-webkit-tests --skipped=ignore --no-retry-failures plugins and there is no regression ...
4 years, 9 months ago (2016-03-17 17:01:40 UTC) #3
dcheng
1) Is this specified somewhere? What does changing this fix? AFAIK, this is only exposed ...
4 years, 9 months ago (2016-03-17 19:26:57 UTC) #4
Julien Isorce Samsung
On 2016/03/17 19:26:57, dcheng wrote: > 1) Is this specified somewhere? What does changing this ...
4 years, 9 months ago (2016-03-17 21:45:16 UTC) #5
Julien Isorce Samsung
Also FWIW the code that I am changing has been introduced by this CL https://codereview.chromium.org/230813002, ...
4 years, 9 months ago (2016-03-17 21:52:29 UTC) #6
bashi
Could you write a layout test so that I can check the behavior of other ...
4 years, 9 months ago (2016-03-17 23:48:22 UTC) #7
Krzysztof Olczyk
On 2016/03/17 at 21:52:29, j.isorce wrote: > Also FWIW the code that I am changing ...
4 years, 9 months ago (2016-03-18 06:53:52 UTC) #8
haraken
I'd like to have a layout test for this.
4 years, 9 months ago (2016-03-18 06:58:57 UTC) #9
Julien Isorce Samsung
On 2016/03/18 06:58:57, haraken wrote: > I'd like to have a layout test for this. ...
4 years, 9 months ago (2016-03-18 11:33:29 UTC) #10
dcheng
Let's not add things to test plugin since we're actively trying to remove it. Can ...
4 years, 9 months ago (2016-03-18 23:32:31 UTC) #12
Julien Isorce Samsung
On 2016/03/18 23:32:31, dcheng wrote: > Let's not add things to test plugin since we're ...
4 years, 9 months ago (2016-03-21 15:31:22 UTC) #13
dcheng
https://codereview.chromium.org/1813823002/diff/40001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html File third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html (right): https://codereview.chromium.org/1813823002/diff/40001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html#newcode17 third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html:17: "testprop": { get: function () { return undefined; } ...
4 years, 9 months ago (2016-03-21 17:29:21 UTC) #15
Julien Isorce Samsung
https://codereview.chromium.org/1813823002/diff/40001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html File third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html (right): https://codereview.chromium.org/1813823002/diff/40001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html#newcode17 third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html:17: "testprop": { get: function () { return undefined; } ...
4 years, 9 months ago (2016-03-21 18:02:56 UTC) #16
dcheng
https://codereview.chromium.org/1813823002/diff/40001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html File third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html (right): https://codereview.chromium.org/1813823002/diff/40001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html#newcode17 third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html:17: "testprop": { get: function () { return undefined; } ...
4 years, 9 months ago (2016-03-21 18:09:15 UTC) #17
Julien Isorce Samsung
On 2016/03/21 18:09:15, dcheng wrote: > https://codereview.chromium.org/1813823002/diff/40001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html > File third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html (right): > > https://codereview.chromium.org/1813823002/diff/40001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html#newcode17 > ...
4 years, 9 months ago (2016-03-21 19:08:21 UTC) #18
bashi
https://codereview.chromium.org/1813823002/diff/60001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html File third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html (right): https://codereview.chromium.org/1813823002/diff/60001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html#newcode22 third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html:22: document.getElementById('result').innerHTML = 'SUCCESS'; Printing SUCCESS is not the best ...
4 years, 9 months ago (2016-03-21 23:33:15 UTC) #19
Julien Isorce Samsung
On 2016/03/21 23:33:15, bashi1 wrote: > https://codereview.chromium.org/1813823002/diff/60001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html > File third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html (right): > > https://codereview.chromium.org/1813823002/diff/60001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html#newcode22 > ...
4 years, 9 months ago (2016-03-22 12:05:41 UTC) #20
bashi
https://codereview.chromium.org/1813823002/diff/80001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html File third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html (right): https://codereview.chromium.org/1813823002/diff/80001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html#newcode6 third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html:6: jsTestIsAsync = true; Why does this test need to ...
4 years, 9 months ago (2016-03-22 23:14:51 UTC) #22
Julien Isorce Samsung
On 2016/03/22 23:14:51, bashi1 wrote: > https://codereview.chromium.org/1813823002/diff/80001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html > File third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html (right): > > https://codereview.chromium.org/1813823002/diff/80001/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html#newcode6 > ...
4 years, 9 months ago (2016-03-23 17:56:55 UTC) #23
piman
LGTM, however please see https://codereview.chromium.org/1821103002/ where we add documentation for the API exposed by the ...
4 years, 9 months ago (2016-03-23 20:22:00 UTC) #24
haraken
https://codereview.chromium.org/1813823002/diff/100001/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp File third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp (right): https://codereview.chromium.org/1813823002/diff/100001/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp#newcode64 third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp:64: if (value->IsUndefined() && !instance->Has(info.GetIsolate()->GetCurrentContext(), property).FromJust()) Would you use a ...
4 years, 9 months ago (2016-03-24 02:38:09 UTC) #26
Julien Isorce Samsung
On 2016/03/23 20:22:00, piman wrote: > LGTM, however please see https://codereview.chromium.org/1821103002/ where we > add ...
4 years, 9 months ago (2016-03-24 09:55:33 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1813823002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1813823002/120001
4 years, 9 months ago (2016-03-24 09:56:24 UTC) #30
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-24 11:30:30 UTC) #32
piman
lgtm
4 years, 9 months ago (2016-03-24 18:43:05 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1813823002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1813823002/120001
4 years, 9 months ago (2016-03-24 20:12:43 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/160559)
4 years, 9 months ago (2016-03-24 20:23:55 UTC) #38
bashi
bindings/ LGTM.
4 years, 9 months ago (2016-03-24 23:38:08 UTC) #39
haraken
bindings LGTM.
4 years, 9 months ago (2016-03-25 02:14:39 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1813823002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1813823002/120001
4 years, 8 months ago (2016-03-25 08:55:06 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/160744)
4 years, 8 months ago (2016-03-25 09:03:29 UTC) #44
Julien Isorce Samsung
** Presubmit ERRORS ** Missing LGTM from an OWNER for these files: ppapi/tests/blink_deprecated_test_plugin.cc
4 years, 8 months ago (2016-03-25 10:09:23 UTC) #45
dcheng
lgtm Weird, both piman and I should be OWNERS for that file.
4 years, 8 months ago (2016-03-25 16:11:33 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1813823002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1813823002/120001
4 years, 8 months ago (2016-03-25 16:12:02 UTC) #48
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 8 months ago (2016-03-25 17:13:29 UTC) #50
commit-bot: I haz the power
4 years, 8 months ago (2016-03-25 17:15:00 UTC) #52
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/9e08bcbbb080114780f7d37ff4d9f3946e59d651
Cr-Commit-Position: refs/heads/master@{#383296}

Powered by Google App Engine
This is Rietveld 408576698