Commit Graph

983 Commits

Author SHA1 Message Date
dslomov@chromium.org
c9049c0325 Keyed loads from super with numeric keys.
R=ishell@chromium.org, arv@chromium.org
BUG=v8:3330
LOG=N

Review URL: https://codereview.chromium.org/638193004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-10 10:40:29 +00:00
jochen@chromium.org
d78fab455a Fix data race in cctest/test-api/RegExpInterruption
BUG=v8:3615
R=yangguo@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/634523003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-08 07:41:28 +00:00
yangguo@chromium.org
ec871585fc Add stack trace to the promise reject callback.
R=aandrey@chromium.org
BUG=chromium:393913
LOG=N

Review URL: https://codereview.chromium.org/630373003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-07 12:03:55 +00:00
yangguo@chromium.org
321dad9b8e Introduce v8::Object::GetIsolate().
API=v8::Object::GetIsolate()
LOG=Y
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/617263003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-02 06:52:39 +00:00
yangguo@chromium.org
e68e62c891 Introduce PromiseRejectCallback.
R=aandrey@chromium.org, yurys@chromium.org, rossberg@chromium.org
API=v8::Isolate::SetPromiseRejectCallback, v8::Promise::HasHandler
LOG=Y
BUG=v8:3093

Review URL: https://codereview.chromium.org/600723005

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-30 15:29:08 +00:00
alph@chromium.org
24d1ef4868 Initial implementation of GetStackSample sampling profiler API.
The patch is based on https://codereview.chromium.org/578163002/#ps20001
made by gholap@chromium.org

LOG=N
BUG=v8:3490
R=bmeurer@chromium.org, yurys@chromium.org

Review URL: https://codereview.chromium.org/596533002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 12:59:54 +00:00
aandrey@chromium.org
4b072d16f2 Add IsGeneratorFunction and IsGeneratorObject checks to v8::Value.
R=ulan@chromium.org, yangguo@chromium.org, wingo, yangguo

Review URL: https://codereview.chromium.org/608503002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24278 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 10:22:56 +00:00
dslomov@chromium.org
6312804eb3 Access checks test for stores to 'super'.
R=dcarney@chromium.org
BUG=v8:3330
LOG=N

Review URL: https://codereview.chromium.org/609273002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 08:47:04 +00:00
marja@chromium.org
cc2c6e6339 Script streaming: fix split UTF-8 character handling.
Invalid UTF-8 data can contain too many characters which look like they're part
of a multi-byte character, and that was overflowing a buffer.

BUG=chromium:417891
LOG=n

.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/607043002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24251 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-26 11:17:31 +00:00
loislo@chromium.org
b9583b5f98 String::NewExternal should not crash the renderer.
The blink may pass a very long string to v8
for making a handle to it. v8 has max string length
limit and creates exception. But NewExternal code does not
check that the handle is null and crashes the renderer.

With the fix the js code receives the exception.

BUG=414615
LOG=N
R=yangguo@chromium.org, yurys@chromium.org

Review URL: https://codereview.chromium.org/603393004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-26 11:14:09 +00:00
dslomov@chromium.org
e36aacdee2 Implement loads and calls from 'super'
R=verwaest@chromium.org, arv@chromium.org
BUG=v8:3330
LOG=N

Review URL: https://codereview.chromium.org/527963002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 11:08:04 +00:00
jochen@chromium.org
6a14d7d50f Reland 24052 - Require V8 to be explicitly initialized before an Isolate is created
> We also initialize the Isolate on creation.
>
> This should allow for getting rid of the last remaining default isolate
> traces. Also, it'll speed up several isolate related operations that no
> longer require locks.
>
> Embedders that relied on v8::Isolate to return an uninitialized Isolate
> (so they can set ResourceConstraints for example, or set flags that
> modify the way the isolate is created) should either do the setup before
> creating the isolate, or use the recently added CreateParams to pass e.g.
> ResourceConstraints.
>
> BUG=none
> LOG=y
> R=svenpanne@chromium.org
>
> Review URL: https://codereview.chromium.org/469783002

BUG=none
LOG=y
TBR=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/583153002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 08:01:35 +00:00
jochen@chromium.org
525ed1130e Revert "Require V8 to be explicitly initialized before an Isolate is created"
LOG=n
TBR=svenpanne@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/582953002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 21:57:10 +00:00
jochen@chromium.org
27f3cc1b9c Require V8 to be explicitly initialized before an Isolate is created
We also initialize the Isolate on creation.

This should allow for getting rid of the last remaining default isolate
traces. Also, it'll speed up several isolate related operations that no
longer require locks.

Embedders that relied on v8::Isolate to return an uninitialized Isolate
(so they can set ResourceConstraints for example, or set flags that
modify the way the isolate is created) should either do the setup before
creating the isolate, or use the recently added CreateParams to pass e.g.
ResourceConstraints.

BUG=none
LOG=y
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/469783002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 21:07:50 +00:00
verwaest@chromium.org
c5a3850b8f Revert "filter cross context eval"
(Reverts https://codereview.chromium.org/294073002/)

BUG=chromium:415051
LOG=y
R=ishell@chromium.org

Review URL: https://codereview.chromium.org/582093002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 17:25:25 +00:00
hpayer@chromium.org
c54b0bc717 Use the regular start incremental marking strategy in the idle notification.
BUG=
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/568023002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-16 12:48:59 +00:00
jochen@chromium.org
069a9c75ad Move configuration of ResourceConstraints to Isolate construction
We can only set resource constraints before the isolate is initialized.
Since in the future, we want to initialize isolates at construction
time, we need to set constraints there.

It's possible to later modify the stack limit, so introduce an
Isolate::SetStackLimit method for that.

The SetResourceConstraints method will be deprecated. Users should pass
ResourceConstraints to Isolate::New, and use Isolate::SetStackLimit to
later modify the stack limit.

BUG=none
R=svenpanne@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/559993005

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-16 09:15:02 +00:00
jochen@chromium.org
65a1857824 Currently, a new isolate is created in an uninitialized state, and
several API methods will automatically initialize it. During this
uninitialized state, code event handlers and function entry handlers can
be attached to the isolate.

This CL deprecates SetFunctionEntryHook and moves the configuration of
those handlers to the Isolate factory method.

This will allow for initializing the Isolate at creation time in the
future.

Users of V8::SetFunctionEntryHook should pass the entry hook to
Isolate::New instead. V8::SetJitCodeEventHandler should either be passed
to Isolate::New as well, or (if startup events are not required) invoked
via the Isolate.

BUG=none
LOG=y
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/570993002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-15 11:17:00 +00:00
marja@chromium.org
eb19fc013a Add script streaming API.
Blink will use this API to stream script data into V8 as the scripts
load. During loading, V8 can already parse the scripts. They will be then
compiled and executed when the loading is complete.

This is a reincarnation of https://codereview.chromium.org/366153002/
with fixes.

BUG=
R=jochen@chromium.org, rossberg@chromium.org, svenpanne@chromium.org, yangguo@chromium.org

Review URL: https://codereview.chromium.org/566553002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-12 09:12:08 +00:00
yangguo@chromium.org
9dcf34033b Expect access check in JSObject::DefineAccessor.
R=ulan@chromium.org, verwaest@chromium.org
BUG=chromium:411793
LOG=N

Review URL: https://codereview.chromium.org/559403002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-11 12:16:33 +00:00
marja@chromium.org
90af365ae3 Revert "Add script streaming API."
This reverts r23865

Revert "Fix compilation after r23865."

This reverts r23867

Reason: the test contains characters too special for Windows's taste.

TBR=ulan@chromium.org

BUG=

Review URL: https://codereview.chromium.org/545203003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-11 11:29:28 +00:00
marja@chromium.org
61c9683d71 Add script streaming API.
Blink will use this API to stream script data into V8 as the scripts
load. During loading, V8 can already parse the scripts. They will be then
compiled and executed when the loading is complete.

BUG=
R=jochen@chromium.org, rossberg@chromium.org, svenpanne@chromium.org, yangguo@chromium.org

Review URL: https://codereview.chromium.org/366153002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-11 11:06:26 +00:00
yangguo@chromium.org
a311c26d4d Expect requiring access check on objects with hidden properties.
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/563723002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-11 09:48:56 +00:00
yangguo@chromium.org
4e670fd05e Rename ascii to one-byte where applicable.
R=dcarney@chromium.org, marja@chromium.org

Review URL: https://codereview.chromium.org/559913002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-10 12:38:12 +00:00
yangguo@chromium.org
d3af5b67d2 Fix JSReceiver::HasHiddenProperties wrt access-checked objects.
R=jkummerow@chromium.org
BUG=chromium:411877
LOG=N

Review URL: https://codereview.chromium.org/564443002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-10 12:31:13 +00:00
verwaest@chromium.org
3ef094402e Flatten property_kind into state. Add UNKNOWN as a state for dict-mode receivers
BUG=
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/540903002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-04 12:28:13 +00:00
verwaest@chromium.org
5941bb4e73 Never skip access checks in the lookup iterator
BUG=
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/536943002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-03 14:05:55 +00:00
svenpanne@chromium.org
dfda8950de More PNaCL fixes (without GYP/Makefile tweaks)
This is basically https://codereview.chromium.org/513923005/ with a
few changes:

   * Makefile.nacl and v8.gyp are untouched.

   * MAP_NORESERVE-handling is more defensive.

   * Added ugly busy-wait emulation of sem_timedwait.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/521473003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-29 09:39:28 +00:00
mstarzinger@chromium.org
88a842d628 Fix and re-enable test-api/InitializeAndDispose.
R=svenpanne@chromium.org
TEST=cctest/test-api/InitializeAndDispose

Review URL: https://codereview.chromium.org/504093002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-26 13:07:18 +00:00
bmeurer@chromium.org
90c8932596 Replace our homegrown ARRAY_SIZE() with Chrome's arraysize().
Our own ARRAY_SIZE() was pretty bad at error checking. If you use
arrasize() in a wrong way, the compiler will issue an error instead of
silently doing the wrong thing. The previous ARRAY_SIZE() macro is still
available as ARRAYSIZE_UNSAFE() similar to Chrome.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/501323002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-26 09:19:24 +00:00
verwaest@chromium.org
01cfeb1205 Clean up LookupIterator::Configuration naming
BUG=
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/503663003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-25 11:34:43 +00:00
aandrey@chromium.org
6190ac0882 Expose Value::IsMap, IsSet, IsWeakMap, IsWeakSet in V8 API.
These checks will be needed for DevTools.

R=yangguo@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/464413002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-25 08:56:31 +00:00
wingo@igalia.com
558a05bfcf Fix symbol-named function template properties in the API
Thanks to Yutaka Hirano <yhirano@chromium.org> for finding the bug and
providing the test case.

R=rossberg@chromium.org
BUG=

Review URL: https://codereview.chromium.org/496663002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-21 11:55:46 +00:00
verwaest@chromium.org
2d2396a8a8 Get rid of all non-IC uses of LookupOwnRealNamedProperty
BUG=
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/491023002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-21 08:26:42 +00:00
wingo@igalia.com
e929f5fe43 Support symbol-named properties in API
Add new "Name" type to API that is a supertype of Symbol and String.

Object::SetDeclaredAccessor, Object::SetAccessorProperty, Template::Set,
Template::SetAccessorProperty, and Template::SetDeclaredAccessor now
take a Name as the property name instead of a String.

Add Object::SetAccessor, Template::SetNativeDataProperty, and
ObjectTemplate::SetAccessor overloads that can define accessors for
symbol-named properties.

R=dcarney@chromium.org, rossberg@chromium.org
BUG=v8:3394
TEST=cctest/test-api/TestSymbolProperties
LOG=Y

Review URL: https://codereview.chromium.org/459413002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-20 15:25:13 +00:00
verwaest@chromium.org
26d72d5024 Get rid of GetLazyValue and clients.
This breaks fetching name of the constructor property of "Object"-labeled values in the heap-snapshot-generator until that's handlified and can be moved over to the LookupIterator.
BUG=
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/480823004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-20 10:37:23 +00:00
rossberg@chromium.org
8394975ec7 Expose well-known Symbols to C++ API.
BUG=341423
LOG=Y
R=arv@chromium.org, dcarney@chromium.org, rossberg@chromium.org

Review URL: https://codereview.chromium.org/483173002

Patch from Yutaka Hirano <yhirano@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 12:08:46 +00:00
aandrey@chromium.org
3a3d6bd4f6 Expose Value::IsArgumentsObject in V8 API.
R=yangguo@chromium.org, svenpanne@chromium.org, yangguo

Review URL: https://codereview.chromium.org/460333002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-13 13:06:30 +00:00
mstarzinger@chromium.org
44247036a7 Fix newly discovered presubmit errors.
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/462033002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 13:33:35 +00:00
mstarzinger@chromium.org
159cc8ddf2 v8::TryCatch should cancel the scheduled exception on Reset.
v8::TryCatch cancels the scheduled exception on destruction if |Rethrow|
was never called.
It is reasonable to do the same in |Reset|.

BUG=362388, 359386
LOG=
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/443853002

Patch from Yutaka Hirano <yhirano@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-07 08:55:49 +00:00
adamk@chromium.org
bcf8b05072 Enable ES6 Map and Set by default
In doing so also remove all references to the --harmony-collections flag.
Due to the way context snapshotting works, it's not possible to simply
enable the flag by default.

Depends on ES6 Symbols: https://codereview.chromium.org/421313004

BUG=v8:1622
LOG=Y
R=arv@chromium.org, rossberg@chromium.org

Review URL: https://codereview.chromium.org/427723002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 19:37:32 +00:00
adamk@chromium.org
d8c30bd8e7 Enable ES6 Symbols by default
In doing so also remove all references to the --harmony-symbols flag.
Due to the way context snapshotting works, it's not possible to simply enable
the flag by default.

BUG=v8:2158
LOG=Y
R=dslomov@chromium.org

Review URL: https://codereview.chromium.org/421313004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-04 18:17:54 +00:00
bmeurer@chromium.org
d07a2eb806 Rename ASSERT* to DCHECK*.
This way we don't clash with the ASSERT* macros
defined by GoogleTest, and we are one step closer
to being able to replace our homegrown base/ with
base/ from Chrome.

R=jochen@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/430503007

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-04 11:34:54 +00:00
jkummerow@chromium.org
49233c9972 Throw an exception when an access check fails and no external callback is installed
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/428733007

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-30 09:31:06 +00:00
dusan.milosavljevic@imgtec.com
e0401f3f71 MIPS64: Add support for architecture revision 6.
TEST=
BUG=
R=jkummerow@chromium.org, paul.lind@imgtec.com

Review URL: https://codereview.chromium.org/426863006

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-29 18:02:26 +00:00
mstarzinger@chromium.org
947740a6d8 Revert "Make --always-opt also optimize toplevel code."
TBR=ishell@chromium.org

Review URL: https://codereview.chromium.org/429583002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-29 13:08:51 +00:00
mstarzinger@chromium.org
34f5edd500 Make --always-opt also optimize toplevel code.
R=jacob.bramley@arm.com, titzer@chromium.org, rossberg@chromium.org

Review URL: https://codereview.chromium.org/410153002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-29 11:41:42 +00:00
jochen@chromium.org
cb8105e223 Move gc notifications from V8 to Isolate and make idle hint mandatory
Embedders should use e.g. isolate->IdleNotification(1000) instead
of v8::V8::IdleNotification()

BUG=397026
R=hpayer@chromium.org, ernstm@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/412163003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-24 08:28:02 +00:00
mstarzinger@chromium.org
9d2609fe98 Reland "Make v8::TryCatch able to consume natively thrown exceptions."
R=svenpanne@chromium.org
BUG=chromium:362388
TEST=cctest/test-api/TryCatchNative
LOG=N

Review URL: https://codereview.chromium.org/399473006

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-18 13:28:12 +00:00
vogelheim@chromium.org
a42612b4a7 Change ScriptCompiler::CompileOptions to allow for two 'cache' modes
(parser or code) and to be explicit about cache consumption or production
(rather than making presence of cached_data imply one or the other.)

Also add a --cache flag to d8, to allow testing the functionality.

-----------------------------
API change

Reason: Currently, V8 supports a 'parser cache' for repeatedly executing the same script. We'd like to add a 2nd mode that would cache code, and would like to let the embedder decide which mode they chose (if any).

Note: Previously, the 'use cached data' property was implied by the presence of the cached data itself. (That is, kNoCompileOptions and source->cached_data != NULL.) That is no longer sufficient, since the presence of data is no longer sufficient to determine /which kind/ of data is present.

Changes from old behaviour:

- If you previously didn't use caching, nothing changes.
Example:
  v8::CompileUnbound(isolate, source, kNoCompileOptions);

- If you previously used caching, it worked like this:

  - 1st run:
  v8::CompileUnbound(isolate, source, kProduceToCache);
  Then, source->cached_data would contain the
  data-to-be cached. This remains the same, except you
  need to tell V8 which type of data you want.
  v8::CompileUnbound(isolate, source, kProduceParserCache);

  - 2nd run:
  v8::CompileUnbound(isolate, source, kNoCompileOptions);
  with source->cached_data set to the data you received in
  the first run. This will now ignore the cached data, and
  you need to explicitly tell V8 to use it:
  v8::CompileUnbound(isolate, source, kConsumeParserCache);
-----------------------------

BUG=
R=marja@chromium.org, yangguo@chromium.org

Review URL: https://codereview.chromium.org/389573006

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-16 12:18:33 +00:00