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

Issue 2536823003: Fix handling of static names for JS interop and improve test coverage. (Closed)

Created:
4 years ago by Jacob
Modified:
4 years ago
Reviewers:
Jennifer Messerly
CC:
dev-compiler+reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix handling of static names for JS interop and improve test coverage. BUG= R=jmesserly@google.com Committed: https://github.com/dart-lang/sdk/commit/1370b6bb4613f64e1e2ee2cf0d23b0afdaee743e

Patch Set 1 #

Patch Set 2 : Fix handling of static names for JS interop and improve test coverage. #

Total comments: 4

Patch Set 3 : \ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -15 lines) Patch
M pkg/dev_compiler/lib/src/compiler/code_generator.dart View 1 2 8 chunks +55 lines, -15 lines 0 comments Download
A pkg/dev_compiler/test/codegen/lib/html/js_typed_interop_rename_static_test.dart View 1 chunk +95 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Jacob
4 years ago (2016-11-29 17:16:13 UTC) #2
Jennifer Messerly
with two small changes, LGTM :) https://codereview.chromium.org/2536823003/diff/20001/pkg/dev_compiler/lib/src/compiler/code_generator.dart File pkg/dev_compiler/lib/src/compiler/code_generator.dart (right): https://codereview.chromium.org/2536823003/diff/20001/pkg/dev_compiler/lib/src/compiler/code_generator.dart#newcode376 pkg/dev_compiler/lib/src/compiler/code_generator.dart:376: assert(!name.contains('.')); This should ...
4 years ago (2016-11-29 20:54:53 UTC) #3
Jacob
Committed patchset #3 (id:40001) manually as 1370b6bb4613f64e1e2ee2cf0d23b0afdaee743e (presubmit successful).
4 years ago (2016-11-29 21:33:26 UTC) #5
Jacob
4 years ago (2016-11-29 21:37:33 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/2536823003/diff/20001/pkg/dev_compiler/lib/sr...
File pkg/dev_compiler/lib/src/compiler/code_generator.dart (right):

https://codereview.chromium.org/2536823003/diff/20001/pkg/dev_compiler/lib/sr...
pkg/dev_compiler/lib/src/compiler/code_generator.dart:376:
assert(!name.contains('.'));
On 2016/11/29 20:54:52, Jennifer Messerly wrote:
> This should be an error or a throw, rather than an assert. asserts should mean
> invariants that (we believe) cannot be broken under any circumstances. This
one
> could trip because of user input.

Done.

https://codereview.chromium.org/2536823003/diff/20001/pkg/dev_compiler/lib/sr...
pkg/dev_compiler/lib/src/compiler/code_generator.dart:3461: if (enclosingElement
is ClassElement) {
On 2016/11/29 20:54:52, Jennifer Messerly wrote:
> the "is" check is unnecessary -- FieldElement is a ClassMemberElement, here is
> how it is defined in Analyzer:
> 
> abstract class FieldElement
>     implements ClassMemberElement ...
> 
> abstract class ClassMemberElement implements Element {
>   @override
>   ClassElement get enclosingElement;
>   // ...
> }
> 
> (I'm surprised this wasn't a hint since that evaluates to "true")

Surprised I ever thought that is check was needed.

Powered by Google App Engine
This is Rietveld 408576698