|
|
DescriptionUse real IDL types in unit test stubs.
Instead of using generic stub objects, use actual
types, because that is more accurate.
R=bashi
BUG=673214
Committed: https://crrev.com/32158f86547acf2ae9ba9997674ff2ac376cb631
Cr-Commit-Position: refs/heads/master@{#439048}
Patch Set 1 #
Total comments: 6
Patch Set 2 : Feedback addressed. #Patch Set 3 : Without early returns. #
Messages
Total messages: 35 (19 generated)
The CQ bit was checked by dglazkov@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Use real IDL types in unit test stubs. Instead of using generic stub objects, use actual types, because that is more accurate. R=bashi BUG= ========== to ========== Use real IDL types in unit test stubs. Instead of using generic stub objects, use actual types, because that is more accurate. R=bashi BUG=673214 ==========
PTAL.
LGTM
bashi@chromium.org changed reviewers: + bashi@chromium.org
lgtm with one comment. https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... File third_party/WebKit/Source/bindings/scripts/idl_definitions.py (right): https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/bindings/scripts/idl_definitions.py:454: # Defaults, overridden below nit: I think we can remove this comment (it's obvious). https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/bindings/scripts/idl_definitions.py:456: self.extended_attributes = {} Can we move these two lines before 'if not node:' line? I think having default values is good to avoid an AttributeError as code generator assumes that there will be these attributes.
On 2016/12/15 at 04:51:15, bashi wrote: > lgtm with one comment. > > https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... > File third_party/WebKit/Source/bindings/scripts/idl_definitions.py (right): > > https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... > third_party/WebKit/Source/bindings/scripts/idl_definitions.py:454: # Defaults, overridden below > nit: I think we can remove this comment (it's obvious). > > https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... > third_party/WebKit/Source/bindings/scripts/idl_definitions.py:456: self.extended_attributes = {} > Can we move these two lines before 'if not node:' line? I think having default values is good to avoid an AttributeError as code generator assumes that there will be these attributes. Sure thing! Done.
Feedback addressed.
The CQ bit was checked by dglazkov@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
peria@chromium.org changed reviewers: + peria@chromium.org
https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... File third_party/WebKit/Source/bindings/scripts/idl_definitions.py (right): https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/bindings/scripts/idl_definitions.py:451: self.is_read_only = bool(node.GetProperty('READONLY')) Could you merge these 3 lines with the new lines? self.is_read_only = bool(node....) if node else False self.is_static = bool(node...) if node else False self.name = node.GetName if node else None I'm afraid setting no default values will cause errors. https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/bindings/scripts/idl_definitions.py:458: children = node.GetChildren() ditto. children = node.GetChildren() if node else []
dglazkov@chromium.org changed reviewers: + haraken@chromium.org
https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... File third_party/WebKit/Source/bindings/scripts/idl_definitions.py (right): https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/bindings/scripts/idl_definitions.py:451: self.is_read_only = bool(node.GetProperty('READONLY')) On 2016/12/15 at 04:57:08, peria wrote: > Could you merge these 3 lines with the new lines? > > self.is_read_only = bool(node....) if node else False > self.is_static = bool(node...) if node else False > self.name = node.GetName if node else None > > I'm afraid setting no default values will cause errors. They are set above, right?
https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... File third_party/WebKit/Source/bindings/scripts/idl_definitions.py (right): https://codereview.chromium.org/2581613002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/bindings/scripts/idl_definitions.py:451: self.is_read_only = bool(node.GetProperty('READONLY')) On 2016/12/15 05:24:24, dglazkov wrote: > On 2016/12/15 at 04:57:08, peria wrote: > > Could you merge these 3 lines with the new lines? > > > > self.is_read_only = bool(node....) if node else False > > self.is_static = bool(node...) if node else False > > self.name = node.GetName if node else None > > > > I'm afraid setting no default values will cause errors. > > They are set above, right? Yes, on this CL. But my concern is same with bashi-san's comment on #456. I hope we don't have an early return, if possible.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/12/15 at 05:33:40, peria wrote: > I hope we don't have an early return, if possible. I am curious why? Early returns are a good pattern. Look, even IdlOperation uses it.
On 2016/12/16 02:49:03, dglazkov wrote: > On 2016/12/15 at 05:33:40, peria wrote: > > I hope we don't have an early return, if possible. > > I am curious why? Early returns are a good pattern. Look, even IdlOperation uses > it. In future updates, it can easily introduce undefined errors like you fixed in PS2.
Without early returns.
The CQ bit was checked by dglazkov@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
PTAL.
On 2016/12/16 03:17:38, dglazkov wrote: > PTAL. Thank you for the change. LGTM
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by dglazkov@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from haraken@chromium.org, bashi@chromium.org Link to the patchset: https://codereview.chromium.org/2581613002/#ps40001 (title: "Without early returns.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1481869567871530, "parent_rev": "8a45e2ee2841fd432fe2a069f646125f850a7e15", "commit_rev": "d84f2c117bcd96bd05bde26d06974fa471b33e8b"}
Message was sent while issue was closed.
Description was changed from ========== Use real IDL types in unit test stubs. Instead of using generic stub objects, use actual types, because that is more accurate. R=bashi BUG=673214 ========== to ========== Use real IDL types in unit test stubs. Instead of using generic stub objects, use actual types, because that is more accurate. R=bashi BUG=673214 Review-Url: https://codereview.chromium.org/2581613002 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== Use real IDL types in unit test stubs. Instead of using generic stub objects, use actual types, because that is more accurate. R=bashi BUG=673214 Review-Url: https://codereview.chromium.org/2581613002 ========== to ========== Use real IDL types in unit test stubs. Instead of using generic stub objects, use actual types, because that is more accurate. R=bashi BUG=673214 Committed: https://crrev.com/32158f86547acf2ae9ba9997674ff2ac376cb631 Cr-Commit-Position: refs/heads/master@{#439048} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/32158f86547acf2ae9ba9997674ff2ac376cb631 Cr-Commit-Position: refs/heads/master@{#439048} |