15 Commits

Author SHA1 Message Date
Eric Seidel
c14361a751 Remove Isolated Worlds from Sky
These were a feature for allowing multiple
scripting contexts to access the same global
state without leaking wrappers between them.
For example, if the inspector wanted to
modify window.Array.dangerousFunction = ...
it wouldn't want the author's content to have
access to that.

This feature is not part of Sky's security model
and thus this is just dead code.

I tried to remove worlds all together, but there
is something special about how we use a
"fake" world (which is neither main nor isolated)
for GC, regexp and testing.

R=rafaelw@chromium.org, abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/776143003
2014-12-03 15:51:09 -08:00
Eric Seidel
c2f8ed76bd Remove a couple more core/ header includes from v8_inspector
Removed all uses of Frame in InspectorTraceEvents
in the process, since none of them actually
needed a Frame (since each sky instance only
has one frame).

I've just been burning down the list of core
includes using:
grep "#include" sky/engine/v8_inspector/* -h | sort | uniq | sort | grep core

TBR=yurys@chromium.org
BUG=435243

Review URL: https://codereview.chromium.org/771323002
2014-12-02 13:38:02 -08:00
Eric Seidel
41796985bc Move many of v8_inspector dependencies out of core/
This doesn't fully separate v8_inspector from
core, but it does lay the path.

The next steps to removing v8_inspector is to
remove all the # FIXME: Remove lines in the
deps section of v8_inspector/BUILD.gn.

gn check out/Debug v8_inspector
will tell us if we've successfully removed
all the dependencies.

It's unclear if we want to remove the wtf
dependency, but definitely all of the engine/core
dependencies should be removed and presumably
replaced with abstract interfaces which can be provided
to v8_inspector by its host.

Given the size of this patch (and that it's largely
mechanical) I plan to TBR it.

Most of this was done with tools/git/move_source_file.py

TBR=yurys@chromium.org

Review URL: https://codereview.chromium.org/772563003
2014-12-02 13:00:40 -08:00
Eric Seidel
e0fd75b5ab Make absolute and sort all Sky headers
This caused us to lose our gn check certification. :(

Turns out gn check was just ignoring all the header
paths it didn't understand and so gn check passing
for sky wasn't meaning much.  I tried to straighten
out some of the mess in this CL, but its going to take
several more rounds of massaging before gn check
passes again.  On the bright side (almost) all of
our headers are absolute now.  Turns out my script
(attached to the bug) didn't notice ../ includes
but I'll fix that in the next patch.

R=abarth@chromium.org
BUG=435361

Review URL: https://codereview.chromium.org/746023002
2014-11-20 17:42:05 -08:00
Adam Barth
79ae83b21f Make the parser an implementation detail of the Document
This CL removes the parser accessors from the document to prevent folks from
grabbing at it.

R=ojan@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/723583002
2014-11-12 13:22:45 -08:00
Adam Barth
b71fee9e48 Move exports from Document to Module
This CL moves the |exports| from Document to the new |Module| interface,
matching the spec. Also, the |module| object available to scripts is now really
an instance of |Module|.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/703593003
2014-11-10 15:34:25 -08:00
Adam Barth
512c4591a6 Remove HTMLLinkElement
Please use <import> instead.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/696413002
2014-11-03 12:51:24 -08:00
Adam Barth
8323fb1e88 Basic implementation of <import>
This CL adds basic support for the <import> elements. We're using the same imports
machinery as <link rel="import">, which simplifies this patch substantially.

Currently we support both <link rel="import"> and <import>. Once this CL lands, I'll
update all the existing modules and then we can drop support for
<link rel="import">.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/681983005
2014-11-03 10:14:09 -08:00
Adam Barth
e1c150ffca Drop support for this.exports
Please use module.exports instead. As far as I know, all code in the repo has
been converted over to the new style.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/698543006
2014-10-31 15:02:45 -07:00
Adam Barth
fc451b47eb Unfork Sky's trace events
This CL remove the body of Sky's TraceEvent.h in favor of the version in base.
There's still some more of the system to unwind before we can remove all the
other boilerplate.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/691663002
2014-10-30 09:39:46 -07:00
Adam Barth
8385799d73 Fix line numbers in JavaScript stack traces
Instead of calling the function constructor to compile script in Sky, we now
concatenate strings. This has the advantage of making the line numbers
generated in error messages correct but the disadvantage of being a hack. I've
filed https://code.google.com/p/v8/issues/detail?id=3624 to request a proper
API for this purpose.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/688033003
2014-10-29 14:00:57 -07:00
Adam Barth
f3e367c383 Don't crash when importing a module that doesn't export
Instead of crashing, we should use the value "undefined". There's some question
as to whether we should default to the document, but we can resolve that later.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/690483002
2014-10-28 14:13:31 -07:00
Adam Barth
c198c32164 Don't crash when importing a 404
Now we have a test for this case.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/682913002
2014-10-27 17:22:55 -07:00
Adam Barth
08164a0e81 Delete ScriptableDocumentParser
There's only one parser: the HTMLDocumentParser. No need for the complex class
hierarchy.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/680583003
2014-10-24 11:04:40 -07:00
Adam Barth
ae72930937 Open the Sky 2014-10-23 11:17:19 -07:00