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

Issue 23019013: Mark private methods of core libraries as invisible in the VM. (Closed)

Created:
7 years, 4 months ago by Florian Schneider
Modified:
7 years, 3 months ago
Reviewers:
rmacnak, srdjan
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Mark private methods of core libraries as invisible in the VM. This prevents accessing them via reflection which should not be allowed since they are often handled specially by the compiler. Those functions also will not be shown in stacktraces. TEST=tests/language/reflect_core_vm_test.dart R=rmacnak@google.com, srdjan@google.com Committed: https://code.google.com/p/dart/source/detail?r=26625

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -12 lines) Patch
M runtime/vm/exceptions.cc View 1 chunk +4 lines, -12 lines 0 comments Download
M runtime/vm/parser.cc View 1 chunk +15 lines, -0 lines 0 comments Download
A tests/language/reflect_core_vm_test.dart View 1 chunk +20 lines, -0 lines 1 comment Download

Messages

Total messages: 6 (0 generated)
Florian Schneider
7 years, 4 months ago (2013-08-23 13:09:17 UTC) #1
srdjan
lgtm https://codereview.chromium.org/23019013/diff/1/tests/language/reflect_core_vm_test.dart File tests/language/reflect_core_vm_test.dart (right): https://codereview.chromium.org/23019013/diff/1/tests/language/reflect_core_vm_test.dart#newcode15 tests/language/reflect_core_vm_test.dart:15: Expect.isTrue(false); // Unreachable. Expect.throws(() =>im.invoke(const Symbol("_setAt"), [0, 65]), ...
7 years, 4 months ago (2013-08-23 13:58:17 UTC) #2
rmacnak
I think the test belongs in tests/lib/mirrors. Also, you'll need to mark it as failing ...
7 years, 4 months ago (2013-08-23 20:39:40 UTC) #3
Florian Schneider
On 2013/08/23 20:39:40, Ryan Macnak wrote: > I think the test belongs in tests/lib/mirrors. > ...
7 years, 3 months ago (2013-08-26 08:53:44 UTC) #4
Florian Schneider
Committed patchset #1 manually as r26625 (presubmit successful).
7 years, 3 months ago (2013-08-26 09:20:33 UTC) #5
Florian Schneider
7 years, 3 months ago (2013-08-26 09:37:32 UTC) #6
Message was sent while issue was closed.
On 2013/08/26 08:53:44, Florian Schneider wrote:
> On 2013/08/23 20:39:40, Ryan Macnak wrote:
> > I think the test belongs in tests/lib/mirrors.
> > 
> > Also, you'll need to mark it as failing on dart2js because their Symbol
> > constructor won't accept private identifiers (we haven't yet decided on an
API
> > to construct them w/r/t some library).
> >
> 
> It is a vm_test, so it will be skipped for dart2js.
>  
> > LGTM

Ok, my fault - there is now a directory tests/language/vm instead of just naming
the tests *vm_test.dart. I moved the test to there.

Powered by Google App Engine
This is Rietveld 408576698