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

Issue 12288047: Change IsolateNatives.computeThisScript to use captured value of document.currentScript. (Closed)

Created:
7 years, 10 months ago by ahe
Modified:
7 years, 10 months ago
Reviewers:
ngeoffray
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Change IsolateNatives.computeThisScript to use captured value of document.currentScript. This should work on all browsers, including IE9. The problem with IE9 is that it doesn't define the "stack" property on exceptions. Committed: https://code.google.com/p/dart/source/detail?r=18694

Patch Set 1 #

Total comments: 13

Patch Set 2 : Use typeof object and don't use JS_CURRENT_ISOLATE before _globalState has been initialized. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -16 lines) Patch
M dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart View 1 1 chunk +11 lines, -0 lines 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/lib/foreign_helper.dart View 1 chunk +7 lines, -1 line 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart View 1 3 chunks +14 lines, -11 lines 0 comments Download
M dart/tests/compiler/dart2js_extra/dart2js_extra.status View 1 chunk +0 lines, -1 line 0 comments Download
M dart/tests/lib/lib.status View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
ahe
7 years, 10 months ago (2013-02-19 15:09:11 UTC) #1
ngeoffray
LGTM https://codereview.chromium.org/12288047/diff/1/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/12288047/diff/1/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode582 dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:582: // document && (document.currentScript || Don't you need ...
7 years, 10 months ago (2013-02-19 15:22:26 UTC) #2
ahe
Thank you, submitting with a few tweaks. https://codereview.chromium.org/12288047/diff/1/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/12288047/diff/1/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode582 dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:582: // document ...
7 years, 10 months ago (2013-02-19 15:50:37 UTC) #3
ngeoffray
Take this as FYI, it's fine by me if you don't change the code. https://codereview.chromium.org/12288047/diff/1/dart/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart ...
7 years, 10 months ago (2013-02-19 16:00:01 UTC) #4
ahe
7 years, 10 months ago (2013-02-19 16:33:35 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/12288047/diff/1/dart/sdk/lib/_internal/compil...
File dart/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart
(right):

https://codereview.chromium.org/12288047/diff/1/dart/sdk/lib/_internal/compil...
dart/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart:425: //
property was not provided until IE10.
On 2013/02/19 16:00:02, ngeoffray wrote:
> On 2013/02/19 15:50:37, ahe wrote:
> > On 2013/02/19 15:22:26, ngeoffray wrote:
> > > But this code is just relevant to command line engines, according to your
> > > comment above.
> > 
> > This comment is correct, and should help people understand the problem if
they
> > try to restore this code rather than moving it to a helper library.
> 
> Even if it's correct, it is confusing, because it's code that will not be used
> for browsers.

Now I have a problem. I certainly don't want to create confusion, but I really
think it is simpler to refer to the browser name (that are well-known to most),
rather than code names of engines and command lines.

What is worse, "cscript" and "wscript" are really not JavaScript engines. They
are general programs that allow you to execute scripts in many languages
(including Visual Basic and JavaScript).

Powered by Google App Engine
This is Rietveld 408576698