Commit Graph

1920 Commits

Author SHA1 Message Date
Wiktor Garbacz
6674aed03c Cleanup disallowing dynamic (de)allocation.
Change-Id: Icf4d67700bae4338ecf66411f2a5f57c5351f688
Reviewed-on: https://chromium-review.googlesource.com/504867
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
Cr-Commit-Position: refs/heads/master@{#45585}
2017-05-30 08:07:27 +00:00
Jochen Eisinger
74681db644 Automatically add a layout test running bots for api changes
R=machenbach@chromium.org

Change-Id: I48b6bda0bfb3c8aef117616015ee4225d4bdecfc
Reviewed-on: https://chromium-review.googlesource.com/517486
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45562}
2017-05-29 13:17:07 +00:00
Jochen Eisinger
68aa1ab388 Update module APIs to return Maybe<bool>
All APIs that can throw exceptions should return Maybe<> values

BUG=none
R=neis@chromium.org,gsathya@chromium.org

Change-Id: I6a6e5888cd71257bb02bdcfcc587c909d0c1d8f4
Reviewed-on: https://chromium-review.googlesource.com/517785
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45557}
2017-05-29 12:29:43 +00:00
Jochen Eisinger
70de12b73c Remove deprecated ForceSet
Also move the soon-to-be-deprecated version to deprecated

BUG=none
R=ulan@chromium.org

Change-Id: I2252404f63e25ac35c7798daf66b36144bef6a7e
Reviewed-on: https://chromium-review.googlesource.com/518162
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45554}
2017-05-29 11:13:23 +00:00
Sathya Gunasekaran
f4664d0257 [runtime] Implement SmallOrderedHashTable
Implements the Allocate, Add, and HasKey operations. Also, adds GC
support for this new instance type.

Bug: v8:6443
Change-Id: I1cc7ba2faead2a11f7b0381a57858629e123aee6
Reviewed-on: https://chromium-review.googlesource.com/500447
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45551}
2017-05-29 10:04:22 +00:00
jan.krems
a2cbab1bf4 [api] Expose Isolate::SetHostImportModuleDynamicallyCallback
This allows embedders to delay initialization of the module system until after
the isolate was created.

BUG=v8:6428
R=gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2897103002
Cr-Commit-Position: refs/heads/master@{#45546}
2017-05-27 08:02:34 +00:00
Daniel Vogelheim
cdd9ed0879 Updated version to 6.1
TBR=machenbach@chromium.org

Bug: 
Change-Id: I916d52297bd81c5015fcd3185105dcb0d0a3d78f
Reviewed-on: https://chromium-review.googlesource.com/513906
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45520}
2017-05-24 16:24:22 +00:00
mattloring
6803eef142 Allow embedder to set promise internal field count
Asynchronous context tracking mechanisms in Node.js need to store some
state on all promise objects. This change will allow embedders to
configure the number of internal fields on promises as is already done
for ArrayBuffers.

BUG=v8:6435

Review-Url: https://codereview.chromium.org/2889863002
Cr-Commit-Position: refs/heads/master@{#45496}
2017-05-23 17:54:12 +00:00
Eric Holk
381d7b1c74 Make TryHandleSignal available on all POSIX platforms
TryHandleSignal was originally limited by conditional compilation to only
platforms where the WebAssembly trap handler is supported. This caused build
problems, because not all the macros we needed were defined everywhere.

Instead, we make TryHandleSignal available on all POSIX platforms, but it
unconditionally returns false if the trap handler is not supported.

Bug: 
Change-Id: Iab4baf39b1708989edecc4ecfb51b926d8f7fe8d
Reviewed-on: https://chromium-review.googlesource.com/508838
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45468}
2017-05-22 16:40:56 +00:00
Raphael Kubo da Costa
b5e610c192 Make Object::GetOwnPropertyDescriptor() take a Name, not a String.
Most of the plumbing is already present in the non-public API. According to
ES2016, Symbols are also accepted in calls to getOwnProperty(), and taking
them is required in Blink for proper record<K,V> WebIDL conversions.

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

Bug: chromium:724481
Change-Id: I0dfe0e57f6d811f04ecbfd8ec0c97e44c9f02c96
Reviewed-on: https://chromium-review.googlesource.com/509611
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#45454}
2017-05-22 12:02:26 +00:00
Jochen Eisinger
536a5cd2a9 Add COMPONENT tags to OWNERS files where appropriate
R=danno@chromium.org
CC=sshruthi@chromium.org
TBR=verwaest@chromium.org,bmeurer@chromium.org,yangguo@chromium.org,rossberg@chromium.org

Change-Id: I32e09193fa6e847ac3336eab62b6d85c46d71164
Reviewed-on: https://chromium-review.googlesource.com/509508
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45447}
2017-05-22 10:15:28 +00:00
Eric Holk
18a26cfe17 Add memory protection API to ArrayBuffer::Allocator
WebAssembly needs to be able to allocate memory with guard regions, which
requires more functionality from the array buffer allocator. This change adds
functions for reserving memory regions and changing the memory protection.

This CL also includes some minor refactoring of the code to free array buffers.

Bug: chromium:720302
Change-Id: Iab9a266003043b0d36592a79668d1eea53952abf
Reviewed-on: https://chromium-review.googlesource.com/506377
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45407}
2017-05-18 20:35:09 +00:00
Adam Klein
9397c1b73a Revert "[parser] Refactor streaming scanner streams."
This reverts commit ce538f70c1.

Reason for revert: breaks BOM handling (thus breaking Outlook web apps).

Original change's description:
> [parser] Refactor streaming scanner streams.
> 
> Unify, simplify logic, reduce UTF8 specific handling.
> 
> Intend of this is also to have stream views.
> Stream views can be used concurrently by multiple threads, but
> only one thread may fetch new data from the underlying source.
> This together with unified stream view creation is intended to be
> used for parse tasks.
> 
> BUG=v8:6093
> 
> Change-Id: Ied8e93090c506d4735080298f0fdaeed32043915
> Reviewed-on: https://chromium-review.googlesource.com/501789
> Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
> Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#45336}

TBR=marja@chromium.org,vogelheim@chromium.org,jochen@chromium.org,wiktorg@google.com
BUG=v8:6093, chromium:724166

Change-Id: I022a23b8052d20d83a640c07b7864c622548bf90
Reviewed-on: https://chromium-review.googlesource.com/508888
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45404}
2017-05-18 19:28:58 +00:00
hpayer
a9e56f4f36 [heap] Remove max_executable_size resource constraint.
BUG=chromium:716032

Review-Url: https://codereview.chromium.org/2890603007
Cr-Commit-Position: refs/heads/master@{#45400}
2017-05-18 17:37:57 +00:00
Wiktor Garbacz
ce538f70c1 [parser] Refactor streaming scanner streams.
Unify, simplify logic, reduce UTF8 specific handling.

Intend of this is also to have stream views.
Stream views can be used concurrently by multiple threads, but
only one thread may fetch new data from the underlying source.
This together with unified stream view creation is intended to be
used for parse tasks.

BUG=v8:6093

Change-Id: Ied8e93090c506d4735080298f0fdaeed32043915
Reviewed-on: https://chromium-review.googlesource.com/501789
Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45336}
2017-05-16 11:34:41 +00:00
Wiktor Garbacz
cea359906a Fix V8_NORETURN for MSVC
Change-Id: Ie141097c12ad578c752f51393bd5a5df176b3cad
Reviewed-on: https://chromium-review.googlesource.com/504528
Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45301}
2017-05-15 13:33:59 +00:00
Mircea Trofin
0aef84da31 Revert "Revert "Reland "Introducing an event loop mechanism for d8."""
This reverts commit 619dfed4f7.

Original CL:  https://chromium-review.googlesource.com/c/494968/

Bug: 
Change-Id: Ib4a1f481e46f1972420cc8f8d2192bb6c470e08d
Reviewed-on: https://chromium-review.googlesource.com/501650
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45240}
2017-05-10 18:34:10 +00:00
Mircea Trofin
619dfed4f7 Revert "Reland "Introducing an event loop mechanism for d8.""
This reverts commit 45bbf8041d.

Reason for revert: Still some flakes.

Original change's description:
> Reland "Introducing an event loop mechanism for d8."
> 
> This reverts commit 02595c60a3.
> 
> Original CL: https://chromium-review.googlesource.com/c/494968/
> 
> Bug: 
> Change-Id: I7441ed91ebb4a087cdf437ae3239f9b021110a11
> Reviewed-on: https://chromium-review.googlesource.com/500947
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#45212}

TBR=bradnelson@chromium.org,bbudge@chromium.org,mtrofin@chromium.org,jochen@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Bug: 
Change-Id: Idf2ea0431865104042a68bd2dac944a9725bf3f9
Reviewed-on: https://chromium-review.googlesource.com/501370
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45215}
2017-05-10 04:50:19 +00:00
Mircea Trofin
45bbf8041d Reland "Introducing an event loop mechanism for d8."
This reverts commit 02595c60a3.

Original CL: https://chromium-review.googlesource.com/c/494968/

Bug: 
Change-Id: I7441ed91ebb4a087cdf437ae3239f9b021110a11
Reviewed-on: https://chromium-review.googlesource.com/500947
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45212}
2017-05-10 01:02:42 +00:00
Michael Achenbach
02595c60a3 Revert "Revert "Revert "Introducing an event loop mechanism for d8."""
This reverts commit 7dcc8effbd.

Reason for revert: Some flakes still (see comments) and breaks predictable testing:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20predictable/builds/11452

Original change's description:
> Revert "Revert "Introducing an event loop mechanism for d8.""
> 
> This reverts commit f7c25da680.
> 
> Reason for revert: Fixed
> 
> Original change's description:
> > Revert "Introducing an event loop mechanism for d8."
> > 
> > This reverts commit de964dbe57.
> > 
> > Reason for revert:
> > https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/17958
> > 
> > Original change's description:
> > > Introducing an event loop mechanism for d8.
> > > 
> > > This mechanism ensures APIs like wasm async complete their work, 
> > > without requiring use of natives (%APIs).
> > > 
> > > The mechanism is similar to the one used in content_shell,
> > > which should allow us to easily port tests in that environment.
> > > 
> > > Review-Url: https://codereview.chromium.org/2842843005
> > > Cr-Original-Commit-Position: refs/heads/master@{#44908}
> > > Bug: 
> > > Change-Id: I9deee0d256a600c60b42902fc8ef8478e5546344
> > > Reviewed-on: https://chromium-review.googlesource.com/494968
> > > Commit-Queue: Mircea Trofin <mtrofin@google.com>
> > > Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#45165}
> > 
> > TBR=bradnelson@chromium.org,mtrofin@chromium.org,mtrofin@google.com,jochen@chromium.org
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > 
> > Change-Id: Iafec2615d705d1990c57229cab3a988c00b5e12f
> > Reviewed-on: https://chromium-review.googlesource.com/498630
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#45166}
> 
> TBR=bradnelson@chromium.org,machenbach@chromium.org,mtrofin@chromium.org,mtrofin@google.com,jochen@chromium.org,v8-reviews@googlegroups.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: Ic3c782e918326e291a6cb9bb349c609e9a340b09
> Reviewed-on: https://chromium-review.googlesource.com/498430
> Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
> Commit-Queue: Mircea Trofin <mtrofin@google.com>
> Cr-Commit-Position: refs/heads/master@{#45172}

TBR=bradnelson@chromium.org,machenbach@chromium.org,mtrofin@chromium.org,mtrofin@google.com,jochen@chromium.org,v8-reviews@googlegroups.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I21ffba7141db0bfb4a3275b6e1bf4fb399800ed2
Reviewed-on: https://chromium-review.googlesource.com/500128
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45177}
2017-05-09 07:43:45 +00:00
hpayer
4f82f1d948 Rename idle garbage collection callback flag.
TBR=mlippautz@chromium.org

Review-Url: https://codereview.chromium.org/2867863002
Cr-Commit-Position: refs/heads/master@{#45173}
2017-05-08 20:36:17 +00:00
Mircea Trofin
7dcc8effbd Revert "Revert "Introducing an event loop mechanism for d8.""
This reverts commit f7c25da680.

Reason for revert: Fixed

Original change's description:
> Revert "Introducing an event loop mechanism for d8."
> 
> This reverts commit de964dbe57.
> 
> Reason for revert:
> https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/17958
> 
> Original change's description:
> > Introducing an event loop mechanism for d8.
> > 
> > This mechanism ensures APIs like wasm async complete their work, 
> > without requiring use of natives (%APIs).
> > 
> > The mechanism is similar to the one used in content_shell,
> > which should allow us to easily port tests in that environment.
> > 
> > Review-Url: https://codereview.chromium.org/2842843005
> > Cr-Original-Commit-Position: refs/heads/master@{#44908}
> > Bug: 
> > Change-Id: I9deee0d256a600c60b42902fc8ef8478e5546344
> > Reviewed-on: https://chromium-review.googlesource.com/494968
> > Commit-Queue: Mircea Trofin <mtrofin@google.com>
> > Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#45165}
> 
> TBR=bradnelson@chromium.org,mtrofin@chromium.org,mtrofin@google.com,jochen@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: Iafec2615d705d1990c57229cab3a988c00b5e12f
> Reviewed-on: https://chromium-review.googlesource.com/498630
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#45166}

TBR=bradnelson@chromium.org,machenbach@chromium.org,mtrofin@chromium.org,mtrofin@google.com,jochen@chromium.org,v8-reviews@googlegroups.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic3c782e918326e291a6cb9bb349c609e9a340b09
Reviewed-on: https://chromium-review.googlesource.com/498430
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Commit-Queue: Mircea Trofin <mtrofin@google.com>
Cr-Commit-Position: refs/heads/master@{#45172}
2017-05-08 20:19:41 +00:00
hpayer
448501f687 [Api] Add an idle time garbage collection callback flag to GCCallbackFlags.
BUG=chromium:718484

Review-Url: https://codereview.chromium.org/2867073002
Cr-Commit-Position: refs/heads/master@{#45167}
2017-05-08 18:09:39 +00:00
Michael Achenbach
f7c25da680 Revert "Introducing an event loop mechanism for d8."
This reverts commit de964dbe57.

Reason for revert:
https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/17958

Original change's description:
> Introducing an event loop mechanism for d8.
> 
> This mechanism ensures APIs like wasm async complete their work, 
> without requiring use of natives (%APIs).
> 
> The mechanism is similar to the one used in content_shell,
> which should allow us to easily port tests in that environment.
> 
> Review-Url: https://codereview.chromium.org/2842843005
> Cr-Original-Commit-Position: refs/heads/master@{#44908}
> Bug: 
> Change-Id: I9deee0d256a600c60b42902fc8ef8478e5546344
> Reviewed-on: https://chromium-review.googlesource.com/494968
> Commit-Queue: Mircea Trofin <mtrofin@google.com>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#45165}

TBR=bradnelson@chromium.org,mtrofin@chromium.org,mtrofin@google.com,jochen@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Iafec2615d705d1990c57229cab3a988c00b5e12f
Reviewed-on: https://chromium-review.googlesource.com/498630
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45166}
2017-05-08 17:47:27 +00:00
Mircea Trofin
de964dbe57 Introducing an event loop mechanism for d8.
This mechanism ensures APIs like wasm async complete their work, 
without requiring use of natives (%APIs).

The mechanism is similar to the one used in content_shell,
which should allow us to easily port tests in that environment.

Review-Url: https://codereview.chromium.org/2842843005
Cr-Original-Commit-Position: refs/heads/master@{#44908}
Bug: 
Change-Id: I9deee0d256a600c60b42902fc8ef8478e5546344
Reviewed-on: https://chromium-review.googlesource.com/494968
Commit-Queue: Mircea Trofin <mtrofin@google.com>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45165}
2017-05-08 15:35:42 +00:00
ochang
3f4536894a d8: Make in process stack dumping optional
Adds a flag (--disable-in-process-stack-traces) to not install
signal handlers so that e.g. ASan signal handlers will work.

This flag mirrors chromium's one.

R=jochen@chromium.org
BUG=chromium:716235

Review-Url: https://codereview.chromium.org/2854173002
Cr-Commit-Position: refs/heads/master@{#45142}
2017-05-05 16:00:27 +00:00
Ross McIlroy
0733add072 [Deopt] Always patch deopted code to fail hard if entered.
Remove the --zap_code_space flag and always patch deopted code to hard fail
if called.

Also, as a drive-by add deopt code patching for Arm64.

BUG=v8:6246

Change-Id: Ibf1bc53692dbbe618132100a66c56a88c97fd62b
Reviewed-on: https://chromium-review.googlesource.com/496127
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45082}
2017-05-04 10:49:11 +00:00
daniel.bevenius
f5fad6d9b8 Expose TryCatch is_verbose_
This commit adds a getter for the private is_verbose_ member.
The use case for this comes from Node.js where the ability to avoid
calling FatalException if the TryCatch is verbose would be nice to have.

BUG=

Review-Url: https://codereview.chromium.org/2840803002
Cr-Commit-Position: refs/heads/master@{#45018}
2017-05-02 10:28:17 +00:00
jbroman
a16c3c9105 Expose the ValueSerializer data format version as a compile-time constant.
BUG=chromium:704293

Review-Url: https://codereview.chromium.org/2804643006
Cr-Commit-Position: refs/heads/master@{#44945}
2017-04-27 15:14:41 +00:00
Jochen Eisinger
4fdf9fd481 Add documentation for FunctionCallbackInfo
R=verwaest@chromium.org,haraken@chromium.org,yukishiino@chromium.org
BUG=

Change-Id: I273f5ce305f80b2aa5e9c8c42a6e8e5afc51a0a7
Reviewed-on: https://chromium-review.googlesource.com/484422
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44927}
2017-04-27 11:51:25 +00:00
binji
3cc8845680 Add setter to Isolate for allowing Atomics.wait
This makes it easier to set the value for embedders where it is
difficult to plumb through to the Isolate constructor.

BUG=chromium:711809
R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2829223002
Cr-Commit-Position: refs/heads/master@{#44813}
2017-04-24 19:08:22 +00:00
neis
486cd04f3d [modules] Allow resolve-callback to signal failure.
When asked for a module that previously failed to compile or
instantiate, the embedder necessarily has to signal failure.  In this
case, we expect an exception to be scheduled, which we will rethrow.

BUG=v8:1569

Review-Url: https://codereview.chromium.org/2827733002
Cr-Commit-Position: refs/heads/master@{#44729}
2017-04-19 18:28:09 +00:00
Hitoshi Yoshida
1da951ad0b Create a new API Object::SetNativeDataProperty
This new API sets a native data property on an object
directly, as Template::SetNativeDataProperty does.
It is similar to Object::SetAccessor, but properties
set by SetNativeDataProperty without kReadOnly flag
can be replaced.


Bug:chromium:617892

Change-Id: I32973f7190906d76be6802da9a0489edce0bd93e
Reviewed-on: https://chromium-review.googlesource.com/479474
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44716}
2017-04-19 09:51:22 +00:00
kozyatinskiy
54271c21e2 [inspector] move console to builtins
What will we get:
- console would be included into snapshot and allow us to reduce time that we spent in contextCreated function (~5 times faster),
- it allows us to make further small improvement of console methods, e.g. we can implement super quick return from console.assert if first argument is true,
- console calls are ~ 15% faster.

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng

BUG=v8:6175
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2785293002
Cr-Original-Original-Original-Commit-Position: refs/heads/master@{#44353}
Committed: 55905f85d6
Review-Url: https://codereview.chromium.org/2785293002
Cr-Original-Original-Commit-Position: refs/heads/master@{#44355}
Committed: cc74ea0bc4
Review-Url: https://codereview.chromium.org/2785293002
Cr-Original-Commit-Position: refs/heads/master@{#44416}
Committed: f5dc738cda
Review-Url: https://codereview.chromium.org/2785293002
Cr-Commit-Position: refs/heads/master@{#44702}
2017-04-18 20:50:30 +00:00
yangguo
c80c0f11f4 [api] consistently expose all well-known symbols.
R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2812603002
Cr-Commit-Position: refs/heads/master@{#44643}
2017-04-13 12:40:39 +00:00
Michael Hablich
a011e2b83f Updated version to 6.0
TBR=machenbach@chromium.org,vogelheim@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2814993006 .
Cr-Commit-Position: refs/heads/master@{#44642}
2017-04-13 12:39:05 +00:00
yangguo
768c5e2143 [api] Expose instanceof through v8::Value::InstanceOf.
This is requested for Node.js N-API. Tests to be added.

Review-Url: https://codereview.chromium.org/2812613002
Cr-Commit-Position: refs/heads/master@{#44641}
2017-04-13 12:37:21 +00:00
yangguo
5f90a6eb06 [debug,api] Do not use embedder field for debug context id.
We used to reserve the 0-th embedder data field for the debug
context id. This is no longer necessary since the inspector
has migrated to be part of V8. This makes the API a bit simpler.

R=clemensh@chromium.org, jochen@chromium.org, kozyatinskiy@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2806303002
Cr-Commit-Position: refs/heads/master@{#44607}
2017-04-12 11:24:44 +00:00
kozyatinskiy
2e4a687338 [v8] v8::StackTrace::AsArray returns correct array
After [1] we return JSArray with internal structs, we should return JSObjects instead.

[1] https://codereview.chromium.org/2789073002

BUG=v8:6189
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2806373005
Cr-Commit-Position: refs/heads/master@{#44581}
2017-04-11 15:30:50 +00:00
gsathya
94283dcf44 [ESNext] Implement DynamicImportCall
This patch implements the runtime semantics of dynamic import.

We create a new ASTNode so that we can pass the JSFunction closure() to
the runtime function from which we get the script_url.

d8 implements the embedder logic required to load and evaluate the modules.

The API is mostly implemented as specified.

BUG=8:5785

Review-Url: https://codereview.chromium.org/2703563002
Cr-Commit-Position: refs/heads/master@{#44551}
2017-04-11 09:33:11 +00:00
kozyatinskiy
c0c1d76028 [inspector] introduced StackFrame::IsWasm flag
We don't need to do any kind of translation for non-wasm frames. And we need this knowledge for lazy symbolization.
Capturing stack trace is ~7% faster.

BUG=v8:6189
R=dgozman@chromium.org,yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2795103004
Cr-Commit-Position: refs/heads/master@{#44502}
2017-04-08 22:26:22 +00:00
raphael.kubo.da.costa
5ec1cddcdd Expose %IteratorPrototype% as an intrinsic in the public API.
The WebIDL spec expects iterator objects from interfaces that declare pair
iterators to ultimately inherit from %IteratorPrototype%. Expose the
intrinsic object in the public API so we can use it in Blink's bindings
code.

BUG=chromium:689576
R=caitp@igalia.com,jkummerow@chromium.org,jochen@chromium.org

Review-Url: https://codereview.chromium.org/2784543004
Cr-Commit-Position: refs/heads/master@{#44472}
2017-04-07 08:33:57 +00:00
machenbach
e4bb01b760 Revert of [inspector] move console to builtins (patchset #9 id:180001 of https://codereview.chromium.org/2785293002/ )
Reason for revert:
Seems to block roll:
https://codereview.chromium.org/2801013002/

See also:
https://build.chromium.org/p/client.v8.fyi/builders/Linux%20Tests%20%28dbg%29%281%29/builds/2731

Original issue's description:
> [inspector] move console to builtins
>
> What will we get:
> - console would be included into snapshot and allow us to reduce time that we spent in contextCreated function (~5 times faster),
> - it allows us to make further small improvement of console methods, e.g. we can implement super quick return from console.assert if first argument is true,
> - console calls are ~ 15% faster.
>
> BUG=v8:6175
> R=dgozman@chromium.org
>
> Review-Url: https://codereview.chromium.org/2785293002
> Cr-Original-Original-Commit-Position: refs/heads/master@{#44353}
> Committed: 55905f85d6
> Review-Url: https://codereview.chromium.org/2785293002
> Cr-Original-Commit-Position: refs/heads/master@{#44355}
> Committed: cc74ea0bc4
> Review-Url: https://codereview.chromium.org/2785293002
> Cr-Commit-Position: refs/heads/master@{#44416}
> Committed: f5dc738cda

TBR=dgozman@chromium.org,kozyatinskiy@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:6175

Review-Url: https://codereview.chromium.org/2801023003
Cr-Commit-Position: refs/heads/master@{#44429}
2017-04-06 08:38:14 +00:00
kozyatinskiy
f5dc738cda [inspector] move console to builtins
What will we get:
- console would be included into snapshot and allow us to reduce time that we spent in contextCreated function (~5 times faster),
- it allows us to make further small improvement of console methods, e.g. we can implement super quick return from console.assert if first argument is true,
- console calls are ~ 15% faster.

BUG=v8:6175
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2785293002
Cr-Original-Original-Commit-Position: refs/heads/master@{#44353}
Committed: 55905f85d6
Review-Url: https://codereview.chromium.org/2785293002
Cr-Original-Commit-Position: refs/heads/master@{#44355}
Committed: cc74ea0bc4
Review-Url: https://codereview.chromium.org/2785293002
Cr-Commit-Position: refs/heads/master@{#44416}
2017-04-05 16:55:19 +00:00
jbroman
e46f841849 Export the current data format version used by ValueSerializer.
This enables clients like IndexedDB to know when the data format version has
decreased (i.e. the user has switched to an earlier version) and deal with the
resulting incompatibility up front.

BUG=chromium:704293

Review-Url: https://codereview.chromium.org/2772723005
Cr-Commit-Position: refs/heads/master@{#44391}
2017-04-04 19:26:32 +00:00
mtrofin
0bd9f1b8e6 [wasm] Module Builder v8 API: bytes passed in are owned by caller.
This reflects both the contract in blink, as well as what we
plan to do in streamed compilation, where we'll want to lay out
bytes received such that each section and each function body is
contiguous, but they may all be separate - which entails a copy.

BUG=chromium:697028

Review-Url: https://codereview.chromium.org/2797653002
Cr-Commit-Position: refs/heads/master@{#44387}
2017-04-04 16:22:46 +00:00
Franziska Hinkelmann
f9d2c5123e [cleanup] Make ArrayList functions const.
Getting elements, querying length or copying elements
are now const functions.

Drive-by fix: Noticed a few more getters that should be const.
Add a comment to ArrayList functions that are static functions. 
BUG=

Change-Id: I5de1aed97510dea4e47cb974b3259da51ae663af
Reviewed-on: https://chromium-review.googlesource.com/467249
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44372}
2017-04-04 12:06:56 +00:00
machenbach
7c10795209 Revert of [inspector] move console to builtins (patchset #7 id:140001 of https://codereview.chromium.org/2785293002/ )
Reason for revert:
http://crbug.com/v8/6198

Original issue's description:
> [inspector] move console to builtins
>
> What will we get:
> - console would be included into snapshot and allow us to reduce time that we spent in contextCreated function (~5 times faster),
> - it allows us to make further small improvement of console methods, e.g. we can implement super quick return from console.assert if first argument is true,
> - console calls are ~ 15% faster.
>
> BUG=v8:6175
> R=dgozman@chromium.org
>
> Review-Url: https://codereview.chromium.org/2785293002
> Cr-Original-Commit-Position: refs/heads/master@{#44353}
> Committed: 55905f85d6
> Review-Url: https://codereview.chromium.org/2785293002
> Cr-Commit-Position: refs/heads/master@{#44355}
> Committed: cc74ea0bc4

TBR=dgozman@chromium.org,kozyatinskiy@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:6175

Review-Url: https://codereview.chromium.org/2790343002
Cr-Commit-Position: refs/heads/master@{#44358}
2017-04-04 06:48:04 +00:00
kozyatinskiy
cc74ea0bc4 [inspector] move console to builtins
What will we get:
- console would be included into snapshot and allow us to reduce time that we spent in contextCreated function (~5 times faster),
- it allows us to make further small improvement of console methods, e.g. we can implement super quick return from console.assert if first argument is true,
- console calls are ~ 15% faster.

BUG=v8:6175
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2785293002
Cr-Original-Commit-Position: refs/heads/master@{#44353}
Committed: 55905f85d6
Review-Url: https://codereview.chromium.org/2785293002
Cr-Commit-Position: refs/heads/master@{#44355}
2017-04-04 00:38:38 +00:00
kozyatinskiy
6ecbb8572a Revert of [inspector] move console to builtins (patchset #6 id:120001 of https://codereview.chromium.org/2785293002/ )
Reason for revert:
console.toString() should return "[object Object]"

Original issue's description:
> [inspector] move console to builtins
>
> What will we get:
> - console would be included into snapshot and allow us to reduce time that we spent in contextCreated function (~5 times faster),
> - it allows us to make further small improvement of console methods, e.g. we can implement super quick return from console.assert if first argument is true,
> - console calls are ~ 15% faster.
>
> BUG=v8:6175
> R=dgozman@chromium.org
>
> Review-Url: https://codereview.chromium.org/2785293002
> Cr-Commit-Position: refs/heads/master@{#44353}
> Committed: 55905f85d6

TBR=dgozman@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:6175

Review-Url: https://codereview.chromium.org/2795003003
Cr-Commit-Position: refs/heads/master@{#44354}
2017-04-03 23:29:34 +00:00
kozyatinskiy
55905f85d6 [inspector] move console to builtins
What will we get:
- console would be included into snapshot and allow us to reduce time that we spent in contextCreated function (~5 times faster),
- it allows us to make further small improvement of console methods, e.g. we can implement super quick return from console.assert if first argument is true,
- console calls are ~ 15% faster.

BUG=v8:6175
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2785293002
Cr-Commit-Position: refs/heads/master@{#44353}
2017-04-03 23:00:49 +00:00
kozyatinskiy
dc662e5b74 [inspector] store stack frame in struct instead of JSObject
JSObject is slow: creating strings for keys and storing values by these keys after takes significant amount of time.
With this CL console methods (most of them collect top stack frame to calculate source location) are ~33% faster.
V8Debugger::captureStackTrace is ~50% faster.

BUG=v8:6189
R=yangguo@chromium.org
TBR=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2789073002
Cr-Commit-Position: refs/heads/master@{#44344}
2017-04-03 14:58:49 +00:00
jgruber
cec39ad1ad [regexp] Add support for dotAll flag
The dotAll flag changes behavior of the dot '.' character to match every
possible single character instead of excluding certain line terminators.

The implementation is staged behind --harmony-regexp-dotall.

Spec proposal: https://github.com/mathiasbynens/es-regexp-dotall-flag

BUG=v8:6172

Review-Url: https://codereview.chromium.org/2780173002
Cr-Commit-Position: refs/heads/master@{#44295}
2017-03-31 09:20:13 +00:00
addaleax
a63744d50d [api] Improve documentation for API handle types.
Add a few explanations to the documentation several methods and classes,
in particular Local, MaybeLocal, the HandleScopes.

Drive-by-fix: turn a few regular comments into documentation comments.

BUG=

Review-Url: https://codereview.chromium.org/2783843002
Cr-Commit-Position: refs/heads/master@{#44243}
2017-03-29 18:50:44 +00:00
Caitlin Potter
bf463c4dc0 [async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
  information pertinent to resuming execution of an
  AsyncGenerator, such as the Promise associated with the async
  generator request. It is intended to be used as a singly
  linked list, and holds a pointer to the next item in te queue.

- Introduce JSAsyncGeneratorObject (subclass of
  JSGeneratorObject), which includes several new internal fields
  (`queue` which contains a singly linked list of
  AsyncGeneratorRequest objects, and `await_input` which
  contains the sent value from an Await expression (This is
  necessary to prevent function.sent (used by yield*) from
  having the sent value observably overwritten during
  execution).

- Modify SuspendGenerator to accept a set of Flags, which
  indicate whether the suspend is for a Yield or Await, and
  whether it takes place on an async generator or ES6
  generator.

- Introduce interpreter intrinsics and TF intrinsic lowering for
  accessing the await input of an async generator

- Modify the JSGeneratorStore operator to understand whether or
  not it's suspending for a normal yield, or an AsyncGenerator
  Await. This ensures appropriate registers are stored.

- Add versions of ResumeGeneratorTrampoline which store the
  input value in a different field depending on wether it's an
  AsyncGenerator Await resume, or an ordinary resume. Also modifies
  whether debug code will assert that the generator object is a
  JSGeneratorObject or a JSAsyncGeneratorObject depending on the
  resume type.

BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org

Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 17:33:12 +00:00
Yang Guo
da5b745dba [api] deprecate unused context size estimate.
Change-Id: I8de170892f061a8b30d1e39d1a7d3b4e2fe9230d
Reviewed-on: https://chromium-review.googlesource.com/461823
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44222}
2017-03-29 09:56:22 +00:00
gsathya
4c78e4bbad [api] Remove duplicate forward declaration
Review-Url: https://codereview.chromium.org/2784653003
Cr-Commit-Position: refs/heads/master@{#44214}
2017-03-29 06:51:02 +00:00
mtrofin
6226576efa [wasm] Deleted old way of checking embedder limits on wasm size.
BUG=v8:6027

Review-Url: https://codereview.chromium.org/2772203005
Cr-Commit-Position: refs/heads/master@{#44168}
2017-03-28 06:24:35 +00:00
kozyatinskiy
43791ce02c [inspector] finally removed *ExecuteScript from inspector
We don't need hints from embedder any more.

BUG=none
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2773143002
Cr-Commit-Position: refs/heads/master@{#44158}
2017-03-27 19:26:18 +00:00
mtrofin
5fdb5a148e [wasm] Override mechanism for wasm js APIs
V8 side mechanism for overriding the wasm js APIs.

We will use these to:
- implement the Chrome-side constraints on module size, and throw with more
actionable error messages, while preserving layering.
The old mechansms will be deleted once we update the Chrome side with
this new mechanism.

- implement Chrome-side .compile and .instantiate overrides accepting
Response objects.

We may want to evolve this mechanism into something more general, not
requiring V8 preparation, by replacing the v8-definition with embedder
provided definitions. We're currently exploring if we can expand
"Extras", for instance.

BUG=

Review-Url: https://codereview.chromium.org/2773063002
Cr-Commit-Position: refs/heads/master@{#44119}
2017-03-24 18:26:07 +00:00
mtrofin
78905107d3 [wasm] Skeleton WasmModuleObjectBuilder for streamed compilation
APIs and trivial implementation, to unblock Chrome side dev.

BUG=chromium:697028

Review-Url: https://codereview.chromium.org/2763413003
Cr-Commit-Position: refs/heads/master@{#44053}
2017-03-23 01:47:17 +00:00
daniel.bevenius
4e92e12485 Adding V8_WARN_UNUSED_RESULT for specified TODOs
Currently there are a number of comment in src/v8.h which look like
this: TODO(dcarney): mark V8_WARN_UNUSED_RESULT.

This commit attempts to remove these comments and add the
V8_WARN_UNUSED_RESULT macro to the methods in question.

BUG=

Review-Url: https://codereview.chromium.org/2135973002
Cr-Commit-Position: refs/heads/master@{#44010}
2017-03-22 10:24:28 +00:00
mtrofin
9dfa46395a Reland of [wasm] Transferrable modules (patchset #1 id:1 of https://codereview.chromium.org/2762163002/ )
Reason for revert:
Temporarily disabled tests on chromium side (https://codereview.chromium.org/2764933002)

Original issue's description:
> Revert of [wasm] Transferrable modules (patchset #13 id:280001 of https://codereview.chromium.org/2748473004/ )
>
> Reason for revert:
> Breaks layout tests:
> https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14312
>
> See https://github.com/v8/v8/wiki/Blink-layout-tests
>
> Original issue's description:
> > [wasm] Transferrable modules
> >
> > We want to restrict structured cloning in Chrome to:
> > - postMessage senders and receivers that are co-located
> > in the same process
> > - indexedDB (just https).
> >
> > For context, on the Chrome side, we will achieve the postMessage part
> > by using a mechanism similar to transferrables: the
> > SerializedScriptValue will have a list of wasm modules, separate from
> > the serialized data stream; and this list won't be copied cross
> > process boundaries. The IDB part is achieved by explicitly opting in
> > reading/writing to the serialization stream. To block attack vectors
> > in IPC cases, the default for deserialization will be to expect data
> > in the wasm transfers list.
> >
> > This change is the V8 side necessary to enabling this design. We
> > introduce TransferrableModule, an opaque datatype exposed to the
> > embedder. Internally, TransferrableModules are just serialized data,
> > because we don't have a better mechanism, at the moment, for
> > de-contextualizing/re-contextualizing wasm modules (wrt Isolate and
> > Context).
> >
> > The chrome defaults will be implemented in the
> > serialization/deserialization delegates on that side. For the v8 side
> > of things, in the absence of a serialization delegate, the V8
> > serializer will write to serialization stream. In the absence of a
> > deserialization delegate, the deserializer won't work. This asymmetry
> > is intentional - it communicates to the embedder the need to make a
> > policy decision, otherwise wasm serialization/deserialization won't
> > work "out of the box".
> >
> > BUG=v8:6079
> >
> > Review-Url: https://codereview.chromium.org/2748473004
> > Cr-Commit-Position: refs/heads/master@{#43955}
> > Committed: 99743ad460
>
> TBR=jbroman@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:6079
>
> Review-Url: https://codereview.chromium.org/2762163002
> Cr-Commit-Position: refs/heads/master@{#43981}
> Committed: e538b70e1a

TBR=jbroman@chromium.org,bradnelson@chromium.org,machenbach@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:6079

Review-Url: https://codereview.chromium.org/2762273002
Cr-Commit-Position: refs/heads/master@{#43994}
2017-03-21 17:48:05 +00:00
machenbach
e538b70e1a Revert of [wasm] Transferrable modules (patchset #13 id:280001 of https://codereview.chromium.org/2748473004/ )
Reason for revert:
Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14312

See https://github.com/v8/v8/wiki/Blink-layout-tests

Original issue's description:
> [wasm] Transferrable modules
>
> We want to restrict structured cloning in Chrome to:
> - postMessage senders and receivers that are co-located
> in the same process
> - indexedDB (just https).
>
> For context, on the Chrome side, we will achieve the postMessage part
> by using a mechanism similar to transferrables: the
> SerializedScriptValue will have a list of wasm modules, separate from
> the serialized data stream; and this list won't be copied cross
> process boundaries. The IDB part is achieved by explicitly opting in
> reading/writing to the serialization stream. To block attack vectors
> in IPC cases, the default for deserialization will be to expect data
> in the wasm transfers list.
>
> This change is the V8 side necessary to enabling this design. We
> introduce TransferrableModule, an opaque datatype exposed to the
> embedder. Internally, TransferrableModules are just serialized data,
> because we don't have a better mechanism, at the moment, for
> de-contextualizing/re-contextualizing wasm modules (wrt Isolate and
> Context).
>
> The chrome defaults will be implemented in the
> serialization/deserialization delegates on that side. For the v8 side
> of things, in the absence of a serialization delegate, the V8
> serializer will write to serialization stream. In the absence of a
> deserialization delegate, the deserializer won't work. This asymmetry
> is intentional - it communicates to the embedder the need to make a
> policy decision, otherwise wasm serialization/deserialization won't
> work "out of the box".
>
> BUG=v8:6079
>
> Review-Url: https://codereview.chromium.org/2748473004
> Cr-Commit-Position: refs/heads/master@{#43955}
> Committed: 99743ad460

TBR=jbroman@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:6079

Review-Url: https://codereview.chromium.org/2762163002
Cr-Commit-Position: refs/heads/master@{#43981}
2017-03-21 13:54:23 +00:00
mtrofin
99743ad460 [wasm] Transferrable modules
We want to restrict structured cloning in Chrome to:
- postMessage senders and receivers that are co-located
in the same process
- indexedDB (just https).

For context, on the Chrome side, we will achieve the postMessage part
by using a mechanism similar to transferrables: the
SerializedScriptValue will have a list of wasm modules, separate from
the serialized data stream; and this list won't be copied cross
process boundaries. The IDB part is achieved by explicitly opting in
reading/writing to the serialization stream. To block attack vectors
in IPC cases, the default for deserialization will be to expect data
in the wasm transfers list.

This change is the V8 side necessary to enabling this design. We
introduce TransferrableModule, an opaque datatype exposed to the
embedder. Internally, TransferrableModules are just serialized data,
because we don't have a better mechanism, at the moment, for
de-contextualizing/re-contextualizing wasm modules (wrt Isolate and
Context).

The chrome defaults will be implemented in the
serialization/deserialization delegates on that side. For the v8 side
of things, in the absence of a serialization delegate, the V8
serializer will write to serialization stream. In the absence of a
deserialization delegate, the deserializer won't work. This asymmetry
is intentional - it communicates to the embedder the need to make a
policy decision, otherwise wasm serialization/deserialization won't
work "out of the box".

BUG=v8:6079

Review-Url: https://codereview.chromium.org/2748473004
Cr-Commit-Position: refs/heads/master@{#43955}
2017-03-20 19:03:23 +00:00
jbroman
4acdb5eec2 Give v8::Eternal a direct reference to the handle.
This makes it more similar to other handle types (like PersistentBase),
by simply storing an i::Object** cast to T*. This means that it is not
necessary to look up the handle in the eternal handles table to access
the underlying value.

Like the built-in roots (null, etc.), an eternal handle can never be
destroyed, so we don't even need to allocate a separate local handle.
Instead, the Local<T> can point directly at the eternal reference.
This makes Eternal<T>::Get trivial.

Review-Url: https://codereview.chromium.org/2751263003
Cr-Commit-Position: refs/heads/master@{#43912}
2017-03-17 17:23:34 +00:00
jbroman
3700a01c82 Make v8::Eternal::Get and IsEmpty const.
They do not modify the state of the handle.

Review-Url: https://codereview.chromium.org/2753973002
Cr-Commit-Position: refs/heads/master@{#43907}
2017-03-17 14:48:20 +00:00
titzer
72e539360e [rename] Rename internal field to embedder field.
This CL renames all occurrences of "internal field" to "embedder field"
to prevent confusion. As it turns out, these fields are not internal to
V8, but are actually embedder provided fields that should not be mucked
with by the internal implementation of V8.

Note that WASM does use these fields, and it should not.

BUG=v8:6058

Review-Url: https://codereview.chromium.org/2741683004
Cr-Commit-Position: refs/heads/master@{#43900}
2017-03-17 13:26:05 +00:00
Jochen Eisinger
876725d5d5 Enable the embedder to provide stack trace printing
BUG=none
R=yangguo@chromium.org

Change-Id: I53811859efacee9126ba1bdbe5690793833c96e1
Reviewed-on: https://chromium-review.googlesource.com/456338
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43892}
2017-03-17 12:07:25 +00:00
Eric Holk
18c77ce51b Fixing Android x64 build.
BUG= chromium:701590

Change-Id: Ia0a3a7a532a8acd001cb1dc79991f7cc08fc973d
Reviewed-on: https://chromium-review.googlesource.com/456456
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43873}
2017-03-16 18:08:56 +00:00
jkummerow
d0e604bf26 FunctionEntryHook: require no-snapshot build
When a FunctionEntryHook parameter was passed to isolate creation,
we ignored any existing snapshots anyway. Since the ability to
bootstrap from scratch will be removed from snapshot builds, the
FunctionEntryHook feature must depend on a no-snapshot build.

BUG=v8:6055

Review-Url: https://codereview.chromium.org/2733203002
Cr-Commit-Position: refs/heads/master@{#43779}
2017-03-14 12:31:03 +00:00
Jochen Eisinger
2cd2f5feff Remove experimental fast accessor builder API
As the code isn't used, but would have to be ported from hand-written
assembly to CodeStubAssembler anyways, I propose to remove it and
restore it if we decide that we actually need it.

R=vogelheim@chromium.org
BUG=

Change-Id: Iffd7fc6ec534b1dd7a9144da900424355c8a7a02
Reviewed-on: https://chromium-review.googlesource.com/453461
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43763}
2017-03-14 08:14:48 +00:00
eholk
118c376fcb [wasm] Initial signal handler
This is basically the minimum viable signal handler for Wasm bounds checks.
It includes the TLS check and the fine grained instructions checks. These
two checks provide most of the safety for the signal handler. Future CLs will
add code range and data range checks for more robustness.

The trap handling code and data structures are all in src/trap-handler, with
the code that actually runs in the signal handler confined to
src/trap-handler/signal-handler.cc.

This changes adds a new V8 API that the embedder should call from a signal
handler that will give V8 the chance to handle the fault first. For hosts that
do not want to implement their own signal handler, we include the option to
install a simple one. This simple handler is also used for the tests.

When a Wasm module is instantiated, information about each function is passed
to the trap handler, which is used to classify faults. These are removed during
the instance finalizer.

Several future enhancements are planned before turning this on by default.
Obviously, the additional checks will be added to MaybeHandleFault. We are
also planning to add a two-level CodeObjectData table that is grouped by
isolates to make cleanup easier and also reduce potential for contending on
a single data structure.

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277

Review-Url: https://codereview.chromium.org/2371833007
Cr-Original-Original-Commit-Position: refs/heads/master@{#43523}
Committed: a5af7fe9ee
Review-Url: https://codereview.chromium.org/2371833007
Cr-Original-Commit-Position: refs/heads/master@{#43755}
Committed: 338622d7ca
Review-Url: https://codereview.chromium.org/2371833007
Cr-Commit-Position: refs/heads/master@{#43759}
2017-03-13 22:12:23 +00:00
eholk
aba151b92f Revert of [wasm] Initial signal handler (patchset #60 id:1170001 of https://codereview.chromium.org/2371833007/ )
Reason for revert:
ASAN breakage, such as https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20ASAN/builds/19111/steps/Check/logs/grow-memory

Original issue's description:
> [wasm] Initial signal handler
>
> This is basically the minimum viable signal handler for Wasm bounds checks.
> It includes the TLS check and the fine grained instructions checks. These
> two checks provide most of the safety for the signal handler. Future CLs will
> add code range and data range checks for more robustness.
>
> The trap handling code and data structures are all in src/trap-handler, with
> the code that actually runs in the signal handler confined to
> src/trap-handler/signal-handler.cc.
>
> This changes adds a new V8 API that the embedder should call from a signal
> handler that will give V8 the chance to handle the fault first. For hosts that
> do not want to implement their own signal handler, we include the option to
> install a simple one. This simple handler is also used for the tests.
>
> When a Wasm module is instantiated, information about each function is passed
> to the trap handler, which is used to classify faults. These are removed during
> the instance finalizer.
>
> Several future enhancements are planned before turning this on by default.
> Obviously, the additional checks will be added to MaybeHandleFault. We are
> also planning to add a two-level CodeObjectData table that is grouped by
> isolates to make cleanup easier and also reduce potential for contending on
> a single data structure.
>
> BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277
>
> Review-Url: https://codereview.chromium.org/2371833007
> Cr-Original-Commit-Position: refs/heads/master@{#43523}
> Committed: a5af7fe9ee
> Review-Url: https://codereview.chromium.org/2371833007
> Cr-Commit-Position: refs/heads/master@{#43755}
> Committed: 338622d7ca

TBR=ahaas@chromium.org,bradnelson@google.com,hpayer@chromium.org,jochen@chromium.org,mark@chromium.org,mseaborn@chromium.org,titzer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277

Review-Url: https://codereview.chromium.org/2744383002
Cr-Commit-Position: refs/heads/master@{#43757}
2017-03-13 20:03:25 +00:00
eholk
338622d7ca [wasm] Initial signal handler
This is basically the minimum viable signal handler for Wasm bounds checks.
It includes the TLS check and the fine grained instructions checks. These
two checks provide most of the safety for the signal handler. Future CLs will
add code range and data range checks for more robustness.

The trap handling code and data structures are all in src/trap-handler, with
the code that actually runs in the signal handler confined to
src/trap-handler/signal-handler.cc.

This changes adds a new V8 API that the embedder should call from a signal
handler that will give V8 the chance to handle the fault first. For hosts that
do not want to implement their own signal handler, we include the option to
install a simple one. This simple handler is also used for the tests.

When a Wasm module is instantiated, information about each function is passed
to the trap handler, which is used to classify faults. These are removed during
the instance finalizer.

Several future enhancements are planned before turning this on by default.
Obviously, the additional checks will be added to MaybeHandleFault. We are
also planning to add a two-level CodeObjectData table that is grouped by
isolates to make cleanup easier and also reduce potential for contending on
a single data structure.

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277

Review-Url: https://codereview.chromium.org/2371833007
Cr-Original-Commit-Position: refs/heads/master@{#43523}
Committed: a5af7fe9ee
Review-Url: https://codereview.chromium.org/2371833007
Cr-Commit-Position: refs/heads/master@{#43755}
2017-03-13 19:14:35 +00:00
yangguo
faf5f52627 [debugger,api] deprecate everything in v8-debug.h
R=clemensh@chromium.org, jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2727393003
Cr-Commit-Position: refs/heads/master@{#43714}
2017-03-10 07:06:25 +00:00
Camillo Bruni
9ac64ca191 [api] Add v8::Isolate::DumpAndResetStats
Chrome no longer calls v8::Isolate::Dispose on shutdown, essentially preventing
the use of V8 stats within chrome/content_shell. This CL adds a basic hook to
the api that is then used to only print the stats.

Chrome change: https://codereview.chromium.org/2693353002

Change-Id: I1481c14afe611e9c08ae67c815201a45940daa57
Reviewed-on: https://chromium-review.googlesource.com/452338
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43706}
2017-03-09 17:30:42 +00:00
ulan
dab18fb0bb Make idle tasks optional in the default platform.
BUG=v8:6056

Review-Url: https://codereview.chromium.org/2737743002
Cr-Commit-Position: refs/heads/master@{#43640}
2017-03-07 13:37:41 +00:00
addaleax
de1461b7ef Drop UniqueId from include/v8.h
It's unused since March 2 2017 (https://chromium-review.googlesource.com/448539).
This removes it assuming that leaving it in the header was an oversight.

BUG=v8:5828

Review-Url: https://codereview.chromium.org/2732803002
Cr-Commit-Position: refs/heads/master@{#43605}
2017-03-06 10:58:01 +00:00
Michael Lippautz
78867ad870 Remove object grouping
Enbedders should switch to EmbedderHeapTracer API.

BUG=v8:5828

Change-Id: I82f2bc583d246617865a17f5904e02cd35f92fec
Reviewed-on: https://chromium-review.googlesource.com/448539
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43551}
2017-03-02 17:53:07 +00:00
hablich
1a39714805 Update V8 version to 5.9
TBR=machenbach@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2723863005
Cr-Commit-Position: refs/heads/master@{#43536}
2017-03-02 11:09:43 +00:00
bmeurer
0b3e554e03 Revert of [wasm] Initial signal handler (patchset #56 id:1090001 of https://codereview.chromium.org/2371833007/ )
Reason for revert:
Breaks tree, i.e. https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20ASAN/builds/18928/steps/Check/logs/grow-memory

Original issue's description:
> [wasm] Initial signal handler
>
> This is basically the minimum viable signal handler for Wasm bounds checks.
> It includes the TLS check and the fine grained instructions checks. These
> two checks provide most of the safety for the signal handler. Future CLs will
> add code range and data range checks for more robustness.
>
> The trap handling code and data structures are all in src/trap-handler, with
> the code that actually runs in the signal handler confined to
> src/trap-handler/signal-handler.cc.
>
> This changes adds a new V8 API that the embedder should call from a signal
> handler that will give V8 the chance to handle the fault first. For hosts that
> do not want to implement their own signal handler, we include the option to
> install a simple one. This simple handler is also used for the tests.
>
> When a Wasm module is instantiated, information about each function is passed
> to the trap handler, which is used to classify faults. These are removed during
> the instance finalizer.
>
> Several future enhancements are planned before turning this on by default.
> Obviously, the additional checks will be added to MaybeHandleFault. We are
> also planning to add a two-level CodeObjectData table that is grouped by
> isolates to make cleanup easier and also reduce potential for contending on
> a single data structure.
>
> BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277
>
> Review-Url: https://codereview.chromium.org/2371833007
> Cr-Commit-Position: refs/heads/master@{#43523}
> Committed: a5af7fe9ee

TBR=ahaas@chromium.org,bradnelson@google.com,hpayer@chromium.org,jochen@chromium.org,mark@chromium.org,mseaborn@chromium.org,titzer@chromium.org,eholk@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277

Review-Url: https://codereview.chromium.org/2723133003
Cr-Commit-Position: refs/heads/master@{#43525}
2017-03-01 19:47:27 +00:00
eholk
a5af7fe9ee [wasm] Initial signal handler
This is basically the minimum viable signal handler for Wasm bounds checks.
It includes the TLS check and the fine grained instructions checks. These
two checks provide most of the safety for the signal handler. Future CLs will
add code range and data range checks for more robustness.

The trap handling code and data structures are all in src/trap-handler, with
the code that actually runs in the signal handler confined to
src/trap-handler/signal-handler.cc.

This changes adds a new V8 API that the embedder should call from a signal
handler that will give V8 the chance to handle the fault first. For hosts that
do not want to implement their own signal handler, we include the option to
install a simple one. This simple handler is also used for the tests.

When a Wasm module is instantiated, information about each function is passed
to the trap handler, which is used to classify faults. These are removed during
the instance finalizer.

Several future enhancements are planned before turning this on by default.
Obviously, the additional checks will be added to MaybeHandleFault. We are
also planning to add a two-level CodeObjectData table that is grouped by
isolates to make cleanup easier and also reduce potential for contending on
a single data structure.

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277

Review-Url: https://codereview.chromium.org/2371833007
Cr-Commit-Position: refs/heads/master@{#43523}
2017-03-01 18:02:13 +00:00
Georg Neis
ae66dcbec0 [modules] Make Module::Evaluate return the completion value.
This is more useful than always returning undefined.

BUG=v8:1569,v8:5978

Change-Id: Id10cf87f7865db1a85de412460eaead4e4bf3b62
Reviewed-on: https://chromium-review.googlesource.com/446846
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43498}
2017-02-28 19:02:32 +00:00
Daniel Cheng
60991f990b Don't use DCHECK in v8-util.h.
This will randomly break compilation units that don't happen to #define
DCHECK before v8-util.h is included.

BUG=chromium:688155

Change-Id: I7abdaf87c8bb7aca995d9e6e7ef8b4faff0dc50c
Reviewed-on: https://chromium-review.googlesource.com/447002
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43455}
2017-02-27 16:05:46 +00:00
Jochen Eisinger
d3cc730b45 Add a getter for the last entered context or microtask context
This is used for internal security checks in eval(). Expose this to
enable the embedder to implement similar security checks.

R=yangguo@chromium.org
BUG=

Change-Id: I10819713b19527622de5ffffac313d126a887c05
Reviewed-on: https://chromium-review.googlesource.com/446106
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43405}
2017-02-24 09:17:51 +00:00
mtrofin
b40d44ecc1 [wasm] Embedder can control what buffers wasm compilation works on.
Two controls, one for instantiation and one for compilation. They allow
the embedder (e.g. Chrome) check properties of the parameters of those
two operations, and decide if they are allowed to continue.

For example, Chrome may now decline compilation of certain size buffers,
in synchronous cases; same for instantiation (where the buffer size
refers to the size of the buffer containing wasm wire bytes)

BUG=v8:5981

Review-Url: https://codereview.chromium.org/2699843003
Cr-Original-Commit-Position: refs/heads/master@{#43295}
Committed: d9bc0ffb16
Review-Url: https://codereview.chromium.org/2699843003
Cr-Commit-Position: refs/heads/master@{#43336}
2017-02-21 03:43:14 +00:00
hablich
1bbbfb42d5 Revert of [wasm] Embedder can control what buffers wasm compilation works on. (patchset #3 id:60001 of https://codereview.chromium.org/2699843003/ )
Reason for revert:
Introduces a new test failure/flake: https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/16427

Original issue's description:
> [wasm] Embedder can control what buffers wasm compilation works on.
>
> Two controls, one for instantiation and one for compilation. They allow
> the embedder (e.g. Chrome) check properties of the parameters of those
> two operations, and decide if they are allowed to continue.
>
> For example, Chrome may now decline compilation of certain size buffers,
> in synchronous cases; same for instantiation (where the buffer size
> refers to the size of the buffer containing wasm wire bytes)
>
> BUG=v8:5981
>
> Review-Url: https://codereview.chromium.org/2699843003
> Cr-Commit-Position: refs/heads/master@{#43295}
> Committed: d9bc0ffb16

TBR=bradnelson@chromium.org,titzer@chromium.org,mtrofin@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:5981

Review-Url: https://codereview.chromium.org/2701413002
Cr-Commit-Position: refs/heads/master@{#43303}
2017-02-20 08:01:01 +00:00
mtrofin
d9bc0ffb16 [wasm] Embedder can control what buffers wasm compilation works on.
Two controls, one for instantiation and one for compilation. They allow
the embedder (e.g. Chrome) check properties of the parameters of those
two operations, and decide if they are allowed to continue.

For example, Chrome may now decline compilation of certain size buffers,
in synchronous cases; same for instantiation (where the buffer size
refers to the size of the buffer containing wasm wire bytes)

BUG=v8:5981

Review-Url: https://codereview.chromium.org/2699843003
Cr-Commit-Position: refs/heads/master@{#43295}
2017-02-18 01:08:36 +00:00
addaleax
3b15d950ee ValueSerializer: Add SetTreatArrayBufferViewsAsHostObjects() flag
Add `ValueSerializer::SetTreatArrayBufferViewsAsHostObjects()` which
instructs the `ValueSerializer` to treat ArrayBufferView objects as
host objects.

BUG=v8:5926

Review-Url: https://codereview.chromium.org/2696133007
Cr-Commit-Position: refs/heads/master@{#43281}
2017-02-17 14:19:39 +00:00
Toon Verwaest
0a8de761ff Remove unused Box type
BUG=

Change-Id: Ie7a8327fac62a0608b60cf9f0f072f979ac4fd76
Reviewed-on: https://chromium-review.googlesource.com/443528
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@google.com>
Cr-Commit-Position: refs/heads/master@{#43269}
2017-02-17 10:06:22 +00:00
jbroman
7f6b82377b Remove reference to i::JSArrayBuffer from ValueSerializer::TransferArrayBuffer comment.
The API class is v8::ArrayBuffer; JSArrayBuffer is the internal counterpart,
but its name should not appear in a public API comment.

Review-Url: https://codereview.chromium.org/2692853007
Cr-Commit-Position: refs/heads/master@{#43214}
2017-02-15 14:24:08 +00:00
jbroman
328ad0a7c4 Use internalized strings for v8::Template::Set shorthand.
The string will be internalized anyhow when the first object is instantiated,
and since templates are eternal, the string will be eternal anyhow even if
the template is never instantiated.

Review-Url: https://codereview.chromium.org/2697683002
Cr-Commit-Position: refs/heads/master@{#43187}
2017-02-14 14:10:40 +00:00
bbudge
deabb19abc Remove SIMD.js from V8.
LOG=Y
BUG=v8:4124,v8:5948
R=bradnelson@chromium.org,bmeurer@chromium.org,jochen@chromium.org,hpayer@chromium.org,danno@chromium.org

Review-Url: https://codereview.chromium.org/2684313003
Cr-Original-Original-Commit-Position: refs/heads/master@{#43162}
Committed: d170c57ab9
Review-Url: https://codereview.chromium.org/2684313003
Cr-Original-Commit-Position: refs/heads/master@{#43169}
Committed: a9b59a11f1
Review-Url: https://codereview.chromium.org/2684313003
Cr-Commit-Position: refs/heads/master@{#43176}
2017-02-14 06:57:25 +00:00
franzih
a386eb4f04 Revert of Remove SIMD.js from V8. (patchset #7 id:120001 of https://codereview.chromium.org/2684313003/ )
Reason for revert:
Breaks Node integration build.

Original issue's description:
> Remove SIMD.js from V8.
>
> LOG=Y
> BUG=v8:4124,v8:5948
> R=bradnelson@chromium.org,bmeurer@chromium.org,jochen@chromium.org,hpayer@chromium.org,danno@chromium.org
>
> Review-Url: https://codereview.chromium.org/2684313003
> Cr-Original-Commit-Position: refs/heads/master@{#43162}
> Committed: d170c57ab9
> Review-Url: https://codereview.chromium.org/2684313003
> Cr-Commit-Position: refs/heads/master@{#43169}
> Committed: a9b59a11f1

TBR=bradnelson@chromium.org,bmeurer@chromium.org,jochen@chromium.org,hpayer@chromium.org,danno@chromium.org,bradnelson@google.com,machenbach@chromium.org,bbudge@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4124,v8:5948

Review-Url: https://codereview.chromium.org/2695653005
Cr-Commit-Position: refs/heads/master@{#43170}
2017-02-13 21:33:46 +00:00
bbudge
a9b59a11f1 Remove SIMD.js from V8.
LOG=Y
BUG=v8:4124,v8:5948
R=bradnelson@chromium.org,bmeurer@chromium.org,jochen@chromium.org,hpayer@chromium.org,danno@chromium.org

Review-Url: https://codereview.chromium.org/2684313003
Cr-Original-Commit-Position: refs/heads/master@{#43162}
Committed: d170c57ab9
Review-Url: https://codereview.chromium.org/2684313003
Cr-Commit-Position: refs/heads/master@{#43169}
2017-02-13 20:43:08 +00:00
bradnelson
43fc15bb79 Revert of Remove SIMD.js from V8. (patchset #7 id:120001 of https://codereview.chromium.org/2684313003/ )
Reason for revert:
red

Original issue's description:
> Remove SIMD.js from V8.
>
> LOG=Y
> BUG=v8:4124,5948
> R=bradnelson@chromium.org,bmeurer@chromium.org,jochen@chromium.org,hpayer@chromium.org,danno@chromium.org
> (notry since trybots can't patch directory deletes)
> NOTRY=true
>
> Review-Url: https://codereview.chromium.org/2684313003
> Cr-Commit-Position: refs/heads/master@{#43162}
> Committed: d170c57ab9

TBR=bmeurer@chromium.org,jochen@chromium.org,hpayer@chromium.org,danno@chromium.org,bradnelson@google.com,bbudge@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4124,5948

Review-Url: https://codereview.chromium.org/2692933002
Cr-Commit-Position: refs/heads/master@{#43164}
2017-02-13 18:12:14 +00:00
bbudge
d170c57ab9 Remove SIMD.js from V8.
LOG=Y
BUG=v8:4124,5948
R=bradnelson@chromium.org,bmeurer@chromium.org,jochen@chromium.org,hpayer@chromium.org,danno@chromium.org
(notry since trybots can't patch directory deletes)
NOTRY=true

Review-Url: https://codereview.chromium.org/2684313003
Cr-Commit-Position: refs/heads/master@{#43162}
2017-02-13 15:59:22 +00:00
kozyatinskiy
7cc1694f51 [inspector] exposed ExecutionContextId getter by context
BUG=none
R=pfeldman@chromium.org

Review-Url: https://codereview.chromium.org/2690663003
Cr-Commit-Position: refs/heads/master@{#43122}
2017-02-11 02:42:17 +00:00
jkummerow
01882d7f6a Fix missing cases of empty_string canonicalization
Review-Url: https://codereview.chromium.org/2683903002
Cr-Commit-Position: refs/heads/master@{#43047}
2017-02-08 21:12:45 +00:00
raphael.kubo.da.costa
e7b78ac229 Expose more %ArrayPrototype% functions to the public API.
In addition to Array.prototype.values() which is already exposed, Blink
needs access to entries(), forEach() and keys() to properly set the
corresponding functions in value iterators for WebIDL conformance.

Add a few new entries to NATIVE_CONTEXT_IMPORTED_FIELDS and expand
V8_INTRINSICS_LIST, as well as some API tests for all these new exposed
functions.

BUG=chromium:632935
R=caitp@igalia.com,jochen@chromium.org,verwaest@chromium.org,yukishiino@chromium.org

Review-Url: https://codereview.chromium.org/2670833008
Cr-Commit-Position: refs/heads/master@{#43017}
2017-02-07 21:42:06 +00:00
mlippautz
9e248dde60 [api] Mark functions related to object grouping as DEPRECATED
Embedders should use the new EmbedderHeapTracer api.

BUG=v8:5828

Review-Url: https://codereview.chromium.org/2642743008
Cr-Commit-Position: refs/heads/master@{#42974}
2017-02-06 17:42:13 +00:00
yangguo
8ae463d736 [debugger] remove mirror cache and v8::Debug::GetMirror.
R=jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2670823002
Cr-Commit-Position: refs/heads/master@{#42893}
2017-02-02 14:22:15 +00:00
binji
966355585b [d8] Use ValueSerializer for postMessage (instead of ad-hoc serializer)
Review-Url: https://codereview.chromium.org/2643723010
Cr-Commit-Position: refs/heads/master@{#42749}
2017-01-27 20:15:37 +00:00
pfeldman
82ef9f75e3 V8 Inspector: complete migration to the standard message level enum.
BUG=chromium:682521

Review-Url: https://codereview.chromium.org/2659913002
Cr-Commit-Position: refs/heads/master@{#42747}
2017-01-27 18:49:09 +00:00
yukishiino
34bee46b0b Exposes Symbol.toPrimitive in C++ APIs as Symbol::GetToPrimitive.
As Blink needs to set Symbol.toPrimitive, exposes the symbol in C++ APIs
as Symbol::GetToPrimitive.

BUG=chromium:680409

Review-Url: https://codereview.chromium.org/2657933003
Cr-Commit-Position: refs/heads/master@{#42724}
2017-01-27 07:29:15 +00:00
pfeldman
76e31da4f6 V8 Inspector: remove V8ConsoleAPIType from the API, reuse v8::Isolate::MessageErrorLevel instead.
BUG=chromium:682521

Review-Url: https://codereview.chromium.org/2656613004
Cr-Commit-Position: refs/heads/master@{#42666}
2017-01-25 22:23:18 +00:00
binji
6eba6b4b89 Add Isolate parameter to disallow Atomics.wait
Atomics.wait is a function which may block, which is not allowed on the
main thread. Since V8 doesn't know whether a particular isolate is the
"main thread", this CL adds an option to Isolate::CreateParams to choose
whether this function is allowed.

Review-Url: https://codereview.chromium.org/2642293002
Cr-Commit-Position: refs/heads/master@{#42611}
2017-01-23 22:06:12 +00:00
yangguo
876da98a51 [debugger api] remove legacy JSON debug protocol.
R=jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2642253005
Cr-Original-Commit-Position: refs/heads/master@{#42543}
Committed: e26a58e43c
Review-Url: https://codereview.chromium.org/2642253005
Cr-Commit-Position: refs/heads/master@{#42595}
2017-01-23 10:44:20 +00:00
hablich
d840ed11d9 Revert of [build] Introduce an embedder version string (patchset #3 id:40001 of https://codereview.chromium.org/2619213002/ )
Reason for revert:
Blocks roll https://codereview.chromium.org/2647183002/

Original issue's description:
> [build] Introduce an embedder version string
>
> Sometimes, the embedder might want to merge a fix to an abandoned branch
> or to a supported branch but the fix is not relevant to Chromium.
> This adds a new version string that the embedder can set on compile time
> and that will be appended to the official V8 version.
> The separator must be provided in the string. For instance, to have a
> full version string like "5.5.372.37.custom.1", the embedder must set
> V8_EMBEDDER_STRING to ".custom.1".
>
> Related Node.js issue: https://github.com/nodejs/node/pull/9754
>
> BUG=v8:5740
> R=machenbach@chromium.org,hablich@chromium.com,ofrobots@google.com
>
> CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng
>
> Review-Url: https://codereview.chromium.org/2619213002
> Cr-Original-Commit-Position: refs/heads/master@{#42175}
> Committed: fc86d4329b
> Review-Url: https://codereview.chromium.org/2619213002
> Cr-Commit-Position: refs/heads/master@{#42582}
> Committed: 2c1d1e6088

TBR=hablich@chromium.com,machenbach@chromium.org,ofrobots@google.com,mic.besace@gmail.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5740

Review-Url: https://codereview.chromium.org/2643393004
Cr-Commit-Position: refs/heads/master@{#42583}
2017-01-21 22:36:54 +00:00
mic.besace
2c1d1e6088 [build] Introduce an embedder version string
Sometimes, the embedder might want to merge a fix to an abandoned branch
or to a supported branch but the fix is not relevant to Chromium.
This adds a new version string that the embedder can set on compile time
and that will be appended to the official V8 version.
The separator must be provided in the string. For instance, to have a
full version string like "5.5.372.37.custom.1", the embedder must set
V8_EMBEDDER_STRING to ".custom.1".

Related Node.js issue: https://github.com/nodejs/node/pull/9754

BUG=v8:5740
R=machenbach@chromium.org,hablich@chromium.com,ofrobots@google.com

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng

Review-Url: https://codereview.chromium.org/2619213002
Cr-Original-Commit-Position: refs/heads/master@{#42175}
Committed: fc86d4329b
Review-Url: https://codereview.chromium.org/2619213002
Cr-Commit-Position: refs/heads/master@{#42582}
2017-01-21 19:04:22 +00:00
yangguo
7e420cf186 Revert of [debugger api] remove legacy JSON debug protocol. (patchset #2 id:20001 of https://codereview.chromium.org/2642253005/ )
Reason for revert:
Node.js relies on this

Original issue's description:
> [debugger api] remove legacy JSON debug protocol.
>
> R=jgruber@chromium.org
> BUG=v8:5530
>
> Review-Url: https://codereview.chromium.org/2642253005
> Cr-Commit-Position: refs/heads/master@{#42543}
> Committed: e26a58e43c

TBR=jgruber@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2644233003
Cr-Commit-Position: refs/heads/master@{#42549}
2017-01-20 11:30:06 +00:00
yangguo
e26a58e43c [debugger api] remove legacy JSON debug protocol.
R=jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2642253005
Cr-Commit-Position: refs/heads/master@{#42543}
2017-01-20 10:44:27 +00:00
machenbach
4cf44599eb Fix version string
Broke after https://codereview.chromium.org/2621983002

BUG=chromium:581766

Review-Url: https://codereview.chromium.org/2644113002
Cr-Commit-Position: refs/heads/master@{#42509}
2017-01-19 15:21:07 +00:00
mlippautz
45b10228ab [api,profiler] Introduce GetRetainerInfos callback for profiling
BUG=679724

Review-Url: https://codereview.chromium.org/2631063003
Cr-Commit-Position: refs/heads/master@{#42506}
2017-01-19 14:38:21 +00:00
Michael Hablich
f09e57923a Update version to 5.8
TBR=machenbach@chromium.org, vogelheim@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2641003003 .
Cr-Commit-Position: refs/heads/master@{#42504}
2017-01-19 13:34:02 +00:00
jkummerow
3e915e12a1 Internalize strings in-place (reland^3)
using newly introduced ThinStrings, which store a pointer to the actual,
internalized string they represent.

BUG=v8:4520

(Previously landed as #42168 / af51befe69)
(Previously landed as #42193 / 4c699e349a)
(Previously landed as #42235 / ec45e6ed2e)

Review-Url: https://codereview.chromium.org/2549773002
Cr-Commit-Position: refs/heads/master@{#42503}
2017-01-19 13:27:59 +00:00
neis
b0f5abbea3 [modules] Add an IsModule flag to ScriptOriginOptions.
Since the script origin is part of the key used in the compilation
cache, this ensures that the cache never confuses a module with a
non-module script.

BUG=v8:1569,v8:5685

Review-Url: https://codereview.chromium.org/2611643002
Cr-Commit-Position: refs/heads/master@{#42490}
2017-01-19 06:59:20 +00:00
daniel.bevenius
3e4c170bc7 Updating comment changing bevavior -> behavior
BUG=

Review-Url: https://codereview.chromium.org/2187383002
Cr-Commit-Position: refs/heads/master@{#42378}
2017-01-16 14:53:28 +00:00
scottmg
57a87a5270 Don't qualify #include in include/
Followup to https://codereview.chromium.org/2621983002/ so that
v8-version-string.h is includeable with varying include search paths.
This seems to match the pattern of other #includes in the include/
directory.

R=machenbach@chromium.org
BUG=chromium:581766

Review-Url: https://codereview.chromium.org/2634443002
Cr-Commit-Position: refs/heads/master@{#42337}
2017-01-13 16:53:39 +00:00
scottmg
ffc0931f87 Pull define for version out into v8-version-string.h and separate build target
This is part of removing the dependency of the Chromium browser DLL on
Windows on V8.

R=jochen@chromium.org
BUG=chromium:581766

Review-Url: https://codereview.chromium.org/2621983002
Cr-Original-Commit-Position: refs/heads/master@{#42243}
Committed: 4593845417
Review-Url: https://codereview.chromium.org/2621983002
Cr-Commit-Position: refs/heads/master@{#42289}
2017-01-12 20:51:37 +00:00
jkummerow
b4654bf30e Revert of Internalize strings in-place (patchset #20 id:380001 of https://codereview.chromium.org/2549773002/ )
Reason for revert:
Blocks roll, ASan detects leaking ExternalStrings.

Original issue's description:
> Internalize strings in-place (reland^2)
>
> using newly introduced ThinStrings, which store a pointer to the actual,
> internalized string they represent.
>
> BUG=v8:4520
>
> (Previously landed as #42168 / af51befe69)
> (Previously landed as #42193 / 4c699e349a)
>
> Review-Url: https://codereview.chromium.org/2549773002
> Cr-Commit-Position: refs/heads/master@{#42235}
> Committed: ec45e6ed2e

TBR=ishell@chromium.org,hpayer@chromium.org,bmeurer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4520

Review-Url: https://codereview.chromium.org/2626893005
Cr-Commit-Position: refs/heads/master@{#42271}
2017-01-12 15:00:19 +00:00
mlippautz
e00eae9e89 [api] Mark functions related to object grouping as DEPRECATE_SOON
Embedders should use the EmbedderHeapTracer API.

BUG=v8:5828

Review-Url: https://codereview.chromium.org/2628893003
Cr-Commit-Position: refs/heads/master@{#42269}
2017-01-12 14:02:21 +00:00
yangguo
9cd0de73dc [serializer] change internal field callbacks to take data pointer.
R=jochen@chromium.org, peria@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2628093003
Cr-Commit-Position: refs/heads/master@{#42268}
2017-01-12 12:25:58 +00:00
jochen
81c62e070b Do security checks in the promise constructor
Since we only can do limited checks during microtask execution, do the
checks before actually creating a promise

BUG=chromium:658194
R=bmeurer@chromium.org,gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2628863002
Cr-Commit-Position: refs/heads/master@{#42265}
2017-01-12 11:33:51 +00:00
hablich
1adc70b0f9 Revert of Pull define for version out into v8-version.h and separate build target (patchset #1 id:1 of https://codereview.chromium.org/2621983002/ )
Reason for revert:
Blocks roll: https://codereview.chromium.org/2633463002/

Original issue's description:
> Pull define for version out into v8-version.h and separate build target
>
> This is part of removing the dependency of the Chromium browser DLL on
> Windows on V8.
>
> R=jochen@chromium.org
> BUG=chromium:581766
>
> Review-Url: https://codereview.chromium.org/2621983002
> Cr-Commit-Position: refs/heads/master@{#42243}
> Committed: 4593845417

TBR=jochen@chromium.org,machenbach@chromium.org,scottmg@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:581766

Review-Url: https://codereview.chromium.org/2627713008
Cr-Commit-Position: refs/heads/master@{#42257}
2017-01-12 09:26:47 +00:00
scottmg
4593845417 Pull define for version out into v8-version.h and separate build target
This is part of removing the dependency of the Chromium browser DLL on
Windows on V8.

R=jochen@chromium.org
BUG=chromium:581766

Review-Url: https://codereview.chromium.org/2621983002
Cr-Commit-Position: refs/heads/master@{#42243}
2017-01-11 18:40:53 +00:00
jkummerow
ec45e6ed2e Internalize strings in-place (reland^2)
using newly introduced ThinStrings, which store a pointer to the actual,
internalized string they represent.

BUG=v8:4520

(Previously landed as #42168 / af51befe69)
(Previously landed as #42193 / 4c699e349a)

Review-Url: https://codereview.chromium.org/2549773002
Cr-Commit-Position: refs/heads/master@{#42235}
2017-01-11 14:59:35 +00:00
rdevlin.cronin
0befccd21b Update MessageCallback typedef Value name
The Local<Value> in the MessageCallback typedef is named "error", but
should be "data" - it's referred to as "data" everywhere else, and
that seems to be the canonical name for a curried-in value.

BUG=None

Review-Url: https://codereview.chromium.org/2621163003
Cr-Commit-Position: refs/heads/master@{#42234}
2017-01-11 14:48:24 +00:00
ulan
18104fac86 [heap] Add API function for checking if the heap limit was increased
for debugging. This function is needed to pass increased heap limit
from the main DevTools isolate to the worker isolates it spawns.

BUG=chromium:675911

Review-Url: https://codereview.chromium.org/2624973003
Cr-Commit-Position: refs/heads/master@{#42228}
2017-01-11 13:46:27 +00:00
yangguo
a8cfc2f5e4 [debugger] deprecate v8::Debug:GetDebugContext.
R=jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2589203002
Cr-Original-Commit-Position: refs/heads/master@{#41911}
Committed: 381082168d
Review-Url: https://codereview.chromium.org/2589203002
Cr-Commit-Position: refs/heads/master@{#42220}
2017-01-11 11:59:54 +00:00
jkummerow
7ef86f8091 Revert of Internalize strings in-place (patchset #17 id:320001 of https://codereview.chromium.org/2549773002/ )
Reason for revert:
blocks roll, see: https://codereview.chromium.org/2628733002/

Debug mode runs into an Abort("External string expected, but not found").

Original issue's description:
> Internalize strings in-place (reland)
>
> using newly introduced ThinStrings, which store a pointer to the actual,
> internalized string they represent.
>
> BUG=v8:4520
>
> (Previously landed as #42168 / af51befe69.
>
> Review-Url: https://codereview.chromium.org/2549773002
> Cr-Commit-Position: refs/heads/master@{#42193}
> Committed: 4c699e349a

TBR=ishell@chromium.org,hpayer@chromium.org,bmeurer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4520

Review-Url: https://codereview.chromium.org/2625073002
Cr-Commit-Position: refs/heads/master@{#42212}
2017-01-11 09:59:52 +00:00
jkummerow
4c699e349a Internalize strings in-place (reland)
using newly introduced ThinStrings, which store a pointer to the actual,
internalized string they represent.

BUG=v8:4520

(Previously landed as #42168 / af51befe69.

Review-Url: https://codereview.chromium.org/2549773002
Cr-Commit-Position: refs/heads/master@{#42193}
2017-01-10 19:08:58 +00:00
hablich
f3026389ff Revert of [build] Introduce an embedder version string (patchset #2 id:20001 of https://codereview.chromium.org/2619213002/ )
Reason for revert:
Seems to break the Chromium build: https://codereview.chromium.org/2619193005/

Message:

[1832/9671] CXX obj/v8/v8_base/version.o
FAILED: obj/v8/v8_base/version.o
/b/c/cipd/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/v8/v8_base/version.o.d -DV8_DEPRECATION_WARNINGS -DDCHECK_ALWAYS_ON=1 -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=289944-2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DV8_I18N_SUPPORT -DENABLE_HANDLE_ZAPPING -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_TARGET_ARCH_X64 -DDEBUG -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../.. -Igen -I../../v8 -I../../v8/include -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -fcolor-diagnostics -fdebug-prefix-map=/b/c/b/linux/src=. -m64 -march=x86-64 -pthread -g1 --sysroot=../../build/linux/debian_wheezy_amd64-sysroot -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wsign-compare -Winconsistent-missing-override -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -Wno-deprecated -c ../../v8/src/version.cc -o obj/v8/v8_base/version.o
../../v8/src/version.cc:42:34: error: use of undeclared identifier 'V8_EMBEDDER_STRING'
const char* Version::embedder_ = V8_EMBEDDER_STRING;
                                 ^
1 error generated.

Original issue's description:
> [build] Introduce an embedder version string
>
> Sometimes, the embedder might want to merge a fix to an abandoned branch
> or to a supported branch but the fix is not relevant to Chromium.
> This adds a new version string that the embedder can set on compile time
> and that will be appended to the official V8 version.
> The separator must be provided in the string. For instance, to have a
> full version string like "5.5.372.37.custom.1", the embedder must set
> V8_EMBEDDER_STRING to ".custom.1".
>
> Related Node.js issue: https://github.com/nodejs/node/pull/9754
>
> BUG=v8:5740
> R=machenbach@chromium.org,hablich@chromium.com,ofrobots@google.com
>
> Review-Url: https://codereview.chromium.org/2619213002
> Cr-Commit-Position: refs/heads/master@{#42175}
> Committed: fc86d4329b

TBR=hablich@chromium.com,machenbach@chromium.org,ofrobots@google.com,mic.besace@gmail.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5740

Review-Url: https://codereview.chromium.org/2621033002
Cr-Commit-Position: refs/heads/master@{#42182}
2017-01-10 15:21:29 +00:00
mic.besace
fc86d4329b [build] Introduce an embedder version string
Sometimes, the embedder might want to merge a fix to an abandoned branch
or to a supported branch but the fix is not relevant to Chromium.
This adds a new version string that the embedder can set on compile time
and that will be appended to the official V8 version.
The separator must be provided in the string. For instance, to have a
full version string like "5.5.372.37.custom.1", the embedder must set
V8_EMBEDDER_STRING to ".custom.1".

Related Node.js issue: https://github.com/nodejs/node/pull/9754

BUG=v8:5740
R=machenbach@chromium.org,hablich@chromium.com,ofrobots@google.com

Review-Url: https://codereview.chromium.org/2619213002
Cr-Commit-Position: refs/heads/master@{#42175}
2017-01-10 12:34:10 +00:00
machenbach
32c0dff263 Revert of Internalize strings in-place (patchset #16 id:300001 of https://codereview.chromium.org/2549773002/ )
Reason for revert:
gc stress failures:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20gc%20stress/builds/8024

Original issue's description:
> Internalize strings in-place
>
> using newly introduced ThinStrings, which store a pointer to the actual,
> internalized string they represent.
>
> BUG=v8:4520
>
> Review-Url: https://codereview.chromium.org/2549773002
> Cr-Commit-Position: refs/heads/master@{#42168}
> Committed: af51befe69

TBR=ishell@chromium.org,hpayer@chromium.org,bmeurer@chromium.org,jkummerow@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4520

Review-Url: https://codereview.chromium.org/2621913002
Cr-Commit-Position: refs/heads/master@{#42170}
2017-01-10 11:33:04 +00:00
jkummerow
af51befe69 Internalize strings in-place
using newly introduced ThinStrings, which store a pointer to the actual,
internalized string they represent.

BUG=v8:4520

Review-Url: https://codereview.chromium.org/2549773002
Cr-Commit-Position: refs/heads/master@{#42168}
2017-01-10 10:58:03 +00:00
cbruni
09167bf6cd Add Object::IsNullOrUndefined(Isolate*) helper method
The pattern IsNull(isolate) || IsUndefined(isolate) is used in many places all
over the code base.

Review-Url: https://codereview.chromium.org/2601503002
Cr-Commit-Position: refs/heads/master@{#42138}
2017-01-09 13:40:51 +00:00
yangguo
081193d5b1 [serializer] pass internal fields deserializer callback as argument.
Background to this is that blink needs to be able to pass different internal
fields deserialization callbacks for individual to-be-deserialized contexts.

R=jochen@chromium.org, peria@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2619203002
Cr-Commit-Position: refs/heads/master@{#42132}
2017-01-09 10:12:04 +00:00
rdevlin.cronin
f81590a1c8 Remove unnecessary v8:: prefixes in include/v8.h
Remove a bunch of unnecessary v8:: prefixes in include/v8.h.
Some are still necessary for disambiguation purposes (e.g., between
bool Value() and v8::Value, or between v8::Isolate and
v8::internal::Isolate), but many aren't.

BUG=None

Review-Url: https://codereview.chromium.org/2605103003
Cr-Commit-Position: refs/heads/master@{#42071}
2017-01-04 17:07:07 +00:00
binji
534ddf645b Disallow passing a SharedArrayBuffer in the transfer list.
This behavior changed recently. SharedArrayBuffers should not be put in the
transfer list, because they are not detached, and that is the meaning of being
in the transfer list.

This is the V8 side of the change, the Blink side will come next.

Reland of https://codereview.chromium.org/2570433005, it was reverted because
of a Blink-side test failure which has been temporarily disabled; see
https://codereview.chromium.org/2590003002.

BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=676063

Review-Url: https://codereview.chromium.org/2594793005
Cr-Commit-Position: refs/heads/master@{#42054}
2017-01-03 22:52:17 +00:00
jochen
1795343f3c Add support for idle tasks to the default platform
BUG=

Review-Url: https://codereview.chromium.org/2609833003
Cr-Commit-Position: refs/heads/master@{#42022}
2017-01-03 08:41:40 +00:00
jbarboza
224d3764e5 abort in delete operators that shouldn't be called
Section 3.2 of the C++ standard states that destructor definitions
implicitly "use" operator delete functions. Therefore, these operator
delete functions must be defined even if they are never called by
user code explicitly.
http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#261

gcc allows them to remain as empty definitions. However, not all
compilers allow this. (e.g. xlc on zOS)

This pull request creates definitions which if ever called, result
in an abort.

R=danno@chromium.org,jochen@chromium.org
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2588433002
Cr-Commit-Position: refs/heads/master@{#41981}
2016-12-28 18:48:28 +00:00
bakkot
bf9e013bbc [counters] Add UseCounters for 'f() = 0' syntax
This syntax was formerly legal per ECMAScript, but has been a
SyntaxError for some time now. V8 deviates from spec in that it
is instead a runtime error; we'd like to know if we can get
away with removing it (at least in sloppy mode) or if the spec
should be changed.

c.f. https://github.com/tc39/ecma262/issues/257#issuecomment-195106880

Also add self to authors file

BUG=v8:4480

Review-Url: https://codereview.chromium.org/2599253002
Cr-Commit-Position: refs/heads/master@{#41960}
2016-12-27 17:48:40 +00:00
ulan
d6c66dbce6 [heap] New API for increasing the heap limit for debugging.
BUG=chromium:675911

Review-Url: https://codereview.chromium.org/2593043002
Cr-Commit-Position: refs/heads/master@{#41957}
2016-12-27 13:29:58 +00:00
yangguo
f85678159d Revert of [debugger] deprecate v8::Debug:GetDebugContext. (patchset #2 id:20001 of https://codereview.chromium.org/2589203002/ )
Reason for revert:
crbug/676749

Original issue's description:
> [debugger] deprecate v8::Debug:GetDebugContext.
>
> R=jgruber@chromium.org
> BUG=v8:5530
>
> Review-Url: https://codereview.chromium.org/2589203002
> Cr-Commit-Position: refs/heads/master@{#41911}
> Committed: 381082168d

TBR=jgruber@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:5530, chromium:676749

Review-Url: https://codereview.chromium.org/2595413003
Cr-Commit-Position: refs/heads/master@{#41935}
2016-12-23 09:15:15 +00:00
yangguo
381082168d [debugger] deprecate v8::Debug:GetDebugContext.
R=jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2589203002
Cr-Commit-Position: refs/heads/master@{#41911}
2016-12-22 07:04:01 +00:00
yangguo
28432588c2 [api] add API for Promise status and result.
Currently, to find out a Promise's status and result, one has to use the
debug context. This is for example done in Node.js. This new API is a
better replacement, also in the context of the debug context being
deprecated eventually.

R=franzih@chromium.org, gsathya@chromium.org, jochen@chromium.org
BUG=v8:5764

Review-Url: https://codereview.chromium.org/2589113002
Cr-Commit-Position: refs/heads/master@{#41855}
2016-12-20 12:13:29 +00:00
cbruni
c0282f608c Add unittests to keep InstanceType lists in sync
STRUCT_LIST and INSTANCE_TYPE_LIST are now forced to have the same order
as the InstanceType enum.

Drive-by-fix 1: Move type check and cast functions closer together in objects-inl.h

Drive-by-fix 2: Remove unused instance types SIGNATURE_INFO_TYPE and  TYPE_SWITCH_INFO_TYPE.

BUG=

Review-Url: https://codereview.chromium.org/2578573002
Cr-Commit-Position: refs/heads/master@{#41804}
2016-12-19 12:50:30 +00:00
gsathya
b1c148b91f [promisehook] Implement PromiseHook
This adds kInit, kResolve, kBefore and kAfter lifecycle hooks to promises.

This also exposes an API to set the PromiseHook.

BUG=v8:4643

Review-Url: https://codereview.chromium.org/2575313002
Cr-Commit-Position: refs/heads/master@{#41775}
2016-12-16 19:17:16 +00:00
mstarzinger
92b370ee64 Introduce {ConstantElementsPair} struct for type safety.
This introduces an explicit struct for the communication channel between
the {ArrayLiteral} AST node and the corresponding runtime methods. Those
methods take a pair of {ElementsKind} as well as an array (can either be
a FixedArray or a FixedDoubleArray) of constant values.

For bonus points it also reduces the size of the involved heap object by
one word (i.e. length field of FixedArray not needed anymore).

R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2581683003
Cr-Commit-Position: refs/heads/master@{#41752}
2016-12-16 10:57:06 +00:00
machenbach
6932ea5904 Revert of Disallow passing a SharedArrayBuffer in the transfer list. (patchset #4 id:60001 of https://codereview.chromium.org/2570433005/ )
Reason for revert:
Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/12098

See:
https://github.com/v8/v8/wiki/Blink-layout-tests

Original issue's description:
> Disallow passing a SharedArrayBuffer in the transfer list.
>
> This behavior changed recently. SharedArrayBuffers should not be put in the
> transfer list, because they are not detached, and that is the meaning of being
> in the transfer list.
>
> This is the V8 side of the change, the Blink side will come next.
>
> Review-Url: https://codereview.chromium.org/2570433005
> Cr-Commit-Position: refs/heads/master@{#41740}
> Committed: 1c5e1504e0

TBR=jbroman@chromium.org,jkummerow@chromium.org,binji@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2579963002
Cr-Commit-Position: refs/heads/master@{#41744}
2016-12-16 07:34:40 +00:00
binji
1c5e1504e0 Disallow passing a SharedArrayBuffer in the transfer list.
This behavior changed recently. SharedArrayBuffers should not be put in the
transfer list, because they are not detached, and that is the meaning of being
in the transfer list.

This is the V8 side of the change, the Blink side will come next.

Review-Url: https://codereview.chromium.org/2570433005
Cr-Commit-Position: refs/heads/master@{#41740}
2016-12-15 23:55:03 +00:00
yangguo
449829b85c [serializer] API to re-use global proxy in v8::Context::FromSnapshot.
R=jochen@chromium.org, peria@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2571743002
Cr-Commit-Position: refs/heads/master@{#41668}
2016-12-13 11:24:58 +00:00
bradnelson
aabbbec67c [wasm] [asmjs] Route asm.js warnings to the dev console.
Generalize Messages to include an error level.
Add a parameter to AddMessageHandler to select which error levels to receive, using a mask (default being just errors, i.e. the current behavior).

BUG=v8:4203
R=dgozman@chromium.org,machenbach@chromium.org,danno@chromium.org,bmeurer@chromium.org,jochen@chromium.org

Review-Url: https://codereview.chromium.org/2526703002
Cr-Commit-Position: refs/heads/master@{#41648}
2016-12-12 14:48:50 +00:00
clemensh
222541dff5 [wasm] Generate correct locations for error messages
The current logic in Isolate::GetLocationFromStackTrace just ignores
wasm frames, making the computed location point to the first javascript
frame, like this:

test.js:17: RuntimeError: divide by zero
module.exports.main();
               ^
RuntimeError: divide by zero
    at main (<WASM>[1]+5)
    at test.js:17:16

This CL not only fixes the location to point to the top-most wasm
frame, but also exposes to the embedder that the script of that location
is a wasm script, allowing for custom printing of wasm locations.
The Shell::ReportException method now checks for this flag, and prints
wasm locations like this:

<WASM>[0]+5: RuntimeError: divide by zero
RuntimeError: divide by zero
    at main (<WASM>[0]+5)
    at test/message/wasm-trap.js:15:16

R=titzer@chromium.org, yangguo@chromium.org
BUG=chromium:613110

Review-Url: https://codereview.chromium.org/2563673002
Cr-Commit-Position: refs/heads/master@{#41640}
2016-12-12 12:46:02 +00:00
yangguo
98b563ebf3 [serializer] include global proxy in additional context snapshots.
Aside from the default snapshot, there is no need for additional context
snapshots to have the ability to replace the global proxy and global object
after deserialization. Changes include:
 - Changes to the API to better distinguish default context snapshot from
   additional context snapshots.
 - Disallow global handles when creating snapshots.
 - Allow extensions when creating snapshots.

This solves the issue of not being able to having accessors and interceptors on
the global object of contexts to be serialized.

R=jochen@chromium.org, peria@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2557743003
Cr-Commit-Position: refs/heads/master@{#41588}
2016-12-08 12:45:05 +00:00
ishell
39e6f2ca4a [ic] Use validity cells to protect keyed element stores against object's prototype chain modifications.
... instead of clearing of all the KeyedStoreICs which didn't always work.

BUG=chromium:662907, chromium:669411, v8:5561
TBR=verwaest@chromium.org, bmeurer@chromium.org

Committed: https://crrev.com/a39522f44f7e0be4686831688917e9675255dcaf
Review-Url: https://codereview.chromium.org/2534613002
Cr-Original-Commit-Position: refs/heads/master@{#41332}
Cr-Commit-Position: refs/heads/master@{#41449}
2016-12-02 10:03:33 +00:00
jgruber
1a6dae8070 [debug] Partial reland of debug API deprecation
This relands API deprecation (without removing the implementation),
removal of NewFunction and BeforeCompile events, and removal of
DebugCommandProcessor tests.

The remaining portion of the original CLs can be relanded after the 4.7
branch point.

Original CLs:

https://codereview.chromium.org/2524323002
https://codereview.chromium.org/2531543002

BUG=v8:5510

Review-Url: https://codereview.chromium.org/2546473008
Cr-Commit-Position: refs/heads/master@{#41446}
2016-12-02 09:02:01 +00:00
jgruber
4292f32ed3 [debug] Revert debug API removal
Debugging API is still in use by Node.

Revert "[debug] remove deprecated debug command message queue."
This reverts commit abdbfc953d.

Revert "[debug] mark more unused debug API as deprecated."
This reverts commit d5ada19ce7.

BUG=v8:5530

Review-Url: https://codereview.chromium.org/2537313005
Cr-Commit-Position: refs/heads/master@{#41427}
2016-12-01 13:34:45 +00:00
kozyatinskiy
d385ed069b [inspector] removed old v8_inspector::Channel API
BUG=chromium:350797
R=dgozman@chromium.org
TBR=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2527473004
Cr-Commit-Position: refs/heads/master@{#41371}
2016-11-29 19:31:23 +00:00
cbruni
85321456cd [api] Support sharing prototypes between FunctionTemplates
FunctionTemplateInfo::SetPrototypeProviderTemplate adds support for sharing
prototypes between several function templates. This is used to properly set up
Image.prototype and HTMLImageElement.protoype which should be equal according
to the spec.

BUG=chromium:2969

Review-Url: https://codereview.chromium.org/2531653002
Cr-Commit-Position: refs/heads/master@{#41343}
2016-11-29 10:14:18 +00:00
machenbach
9c0e2a6723 Revert of [ic] Use validity cells to protect keyed element stores against object's prototype chain modificati… (patchset #2 id:40001 of https://codereview.chromium.org/2534613002/ )
Reason for revert:
Layout test crashes:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/11691

Original issue's description:
> [ic] Use validity cells to protect keyed element stores against object's prototype chain modifications.
>
> ... instead of clearing of all the KeyedStoreICs which didn't always work.
>
> BUG=chromium:662907, v8:5561
> TBR=verwaest@chromium.org, bmeurer@chromium.org
>
> Committed: https://crrev.com/a39522f44f7e0be4686831688917e9675255dcaf
> Cr-Commit-Position: refs/heads/master@{#41332}

TBR=jkummerow@chromium.org,ishell@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:662907, v8:5561

Review-Url: https://codereview.chromium.org/2538693002
Cr-Commit-Position: refs/heads/master@{#41337}
2016-11-29 08:49:48 +00:00
ishell
a39522f44f [ic] Use validity cells to protect keyed element stores against object's prototype chain modifications.
... instead of clearing of all the KeyedStoreICs which didn't always work.

BUG=chromium:662907, v8:5561
TBR=verwaest@chromium.org, bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2534613002
Cr-Commit-Position: refs/heads/master@{#41332}
2016-11-28 22:56:52 +00:00
adamk
4c9f56d90a [api] Remove "experimental" comments from ES6 features in v8.h
R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2473153004
Cr-Commit-Position: refs/heads/master@{#41329}
2016-11-28 21:44:04 +00:00
yangguo
d5ada19ce7 [debug] mark more unused debug API as deprecated.
R=jgruber@chromium.org
BUG=v8:5510

Review-Url: https://codereview.chromium.org/2531543002
Cr-Commit-Position: refs/heads/master@{#41283}
2016-11-25 09:11:04 +00:00
yangguo
abdbfc953d [debug] remove deprecated debug command message queue.
R=jgruber@chromium.org
BUG=v8:5510

Review-Url: https://codereview.chromium.org/2524323002
Cr-Commit-Position: refs/heads/master@{#41259}
2016-11-24 12:56:21 +00:00
yangguo
81a64aa548 [debug] remove JSON debug protocol related tests.
In most cases we can use the debug event listener as alternative.
Multithreaded tests are obsolete.

R=jgruber@chromium.org
BUG=v8:5510

Review-Url: https://codereview.chromium.org/2529883002
Cr-Commit-Position: refs/heads/master@{#41256}
2016-11-24 10:43:22 +00:00
kozyatinskiy
eb3551d0a3 Roll third_party/inspector_protocol to 4ad35c45aca9834b67ec2cb152c816ea1b7ceb48
This roll includes:
  - [inspector_protocol] Introduce protocol::Serializable [1]

[1] https://codereview.chromium.org/2526603002

BUG=chromium:350797
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2523583005
Cr-Commit-Position: refs/heads/master@{#41197}
2016-11-23 00:45:54 +00:00
kozyatinskiy
21091c327b [inspector] removed deprecated ScriptOrigin cstor with is_embedder_debug_script
BUG=none
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2505823002
Cr-Commit-Position: refs/heads/master@{#41162}
2016-11-22 03:46:05 +00:00
kozyatinskiy
afd49054ac [inspector] removed embbeder debugger script flag
After moving inspector from blink to V8, inspector can use DebugInterface to compile and mark internal scripts.

BUG=v8:5530
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2502173002
Cr-Commit-Position: refs/heads/master@{#41087}
2016-11-17 16:51:23 +00:00
vogelheim
541c36c00e Updated version to 5.7
BUG=
TBR=machenbach@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2515443002
Cr-Commit-Position: refs/heads/master@{#41080}
2016-11-17 15:15:22 +00:00
yangguo
0d258b35c8 [api] deprecate v8::Function::IsBuiltin.
R=jochen@chromium.org, kozyatinskiy@chromium.org

Review-Url: https://codereview.chromium.org/2510633002
Cr-Commit-Position: refs/heads/master@{#41060}
2016-11-17 06:42:23 +00:00
yangguo
c759a3d847 [serializer] small fixes for blink snapshot.
Changes include:
 - Adding V8_EXPORT macro for SnapshotCreator
 - Removing outdated DCHECKs.
 - Allow nullptr as external reference. This required a...
 - Refactoring of hashmaps used by the serializer.
 - Remove external references for counters. These are not used
   anywhere for isolates that are being serialized.
 - Put template infos into the partial snapshot cache.
 - Remove unnecessary presubmit check for external references.
   mksnapshot crashes if external references are missing.

R=jochen@chromium.org, vogelheim@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2490783004
Cr-Commit-Position: refs/heads/master@{#40949}
2016-11-14 07:17:59 +00:00
jbroman
5d3ce7ea4f Remove the deprecated ValueSerializer::ReadHeader overload with no context parameter.
Several weeks have now passed since it was deprecated; Chromium does not
call it.

BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2478863002
Cr-Commit-Position: refs/heads/master@{#40945}
2016-11-13 03:10:24 +00:00
jbroman
94142ed8c9 ValueSerializer: Replace use of std::vector with a delegate-allocated buffer.
BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2492943002
Cr-Commit-Position: refs/heads/master@{#40943}
2016-11-12 21:50:26 +00:00
mlippautz
58a753053c [api] Remove marking persistents as partially dependent
Also remove the flag scavenge_reclaim_unmodified_objects which has been
defaulted to true for quite some time now.

BUG=chromium:651354

Review-Url: https://codereview.chromium.org/2486173002
Cr-Commit-Position: refs/heads/master@{#40878}
2016-11-10 09:29:48 +00:00
mlippautz
5b1de36d93 [api] Remove EmbedderReachableReferenceReporter
API was highly experimental. Embedders should use V8::RegisterExternalReference instead.

BUG=chromium:468240
R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2474163002
Cr-Commit-Position: refs/heads/master@{#40769}
2016-11-04 14:28:56 +00:00
vogelheim
cadcd787cf V8 support for cached accessors.
Some accessors requires little to no computation at all, its result can be
cached in a private property, avoiding the call overhead.
Calls to the getter are translated into a cheap property load.

Follow-on to crrev.com/2347523003, from peterssen@google.com

BUG=chromium:634276, v8:5548

Review-Url: https://codereview.chromium.org/2405213002
Cr-Commit-Position: refs/heads/master@{#40765}
2016-11-04 13:03:18 +00:00
dcheng
7fede7bb98 Set global proxy internal field count based on the global object template.
BUG=v8:5588
R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2475433008
Cr-Commit-Position: refs/heads/master@{#40755}
2016-11-04 10:02:36 +00:00
neis
43995e2fa8 [modules] Make ModuleInfoEntry a Struct rather than FixedArray.
It always has the same number of slots.

R=adamk@chromium.org
TBR=bmeurer@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2460353002
Cr-Commit-Position: refs/heads/master@{#40754}
2016-11-04 09:37:43 +00:00
lpy
2525b0573b [Tracing] Make TracingCategoryObserver v8 internal.
This patch removes TracingCategoryObserver API and moves the creation of
observer inside platform initialization, by assuming that either
Platform::AddTraceStateObserver is implemented correctly to add observer to
tracing controller that implemented by embedders, or default tracing controller
has already been set up and attached to platform before
v8::V8::InitializePlatform is called.

BUG=v8:5590

Review-Url: https://codereview.chromium.org/2471583004
Cr-Commit-Position: refs/heads/master@{#40739}
2016-11-03 18:03:56 +00:00
jochen
bf77741d43 Reland "Create internal fields on global proxy objects"
Original CL description:
> Create internal fields on global proxy objects
>
> BUG=v8:5588
> R=verwaest@chromium.org

BUG=v8:5588
TBR=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2472573004
Cr-Commit-Position: refs/heads/master@{#40705}
2016-11-02 14:40:31 +00:00
machenbach
b19abf5371 Revert "Create internal fields on global proxy objects"
This reverts commit 26547761ef.

Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/bui...

See also:
https://github.com/v8/v8/wiki/Blink-layout-tests

BUG=v8:5588
TBR=jochen@chromium.org, verwaest@chromium.org, hablich@chromium.org

Review-Url: https://codereview.chromium.org/2467073002
Cr-Commit-Position: refs/heads/master@{#40686}
2016-11-01 20:40:09 +00:00
lpy
9c78194343 [Tracing] Remove unused excluded categories list.
We only need included categories list, excluded categories list will only work
if we use regular expression in categories list, which is not supported in V8.

TBR=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2462143002
Cr-Commit-Position: refs/heads/master@{#40681}
2016-10-31 19:45:20 +00:00
jochen
26547761ef Create internal fields on global proxy objects
BUG=v8:5588
R=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2467463002
Cr-Commit-Position: refs/heads/master@{#40670}
2016-10-31 14:16:24 +00:00
lpy
6df8096a00 [Tracing] Implement TracingCategoryObserver.
This patch implements TracingCategoryObserver to set global flag when a V8
specific category is enabled. Previously, we set a global flag each time when we
encounter a top level trace event, and use it as a global check. With this
patch, we can set a group of flags when tracing is enabled; besides, we make
V8 tracing feature use V8 flags instead of defining its own flag in a messy way.

With this patch, whatever V8 flag we want to imply in tracing, we define another
integer flag, and the original V8 flag will set it to 0x01 when passing by
commandline, tracing will set it to 0x10 when we start tracing and reset the bit
when we stop tracing.

Review-Url: https://codereview.chromium.org/2436273002
Cr-Commit-Position: refs/heads/master@{#40659}
2016-10-28 20:44:04 +00:00
jochen
f074215082 Add a native data property that replaces itself with a real data property
This is useful for things that don't ever change, but we don't want to
eagerly compute the result.

Doing this from the embedder is difficult, using DefineOwnProperty would
read the property to get the property descriptor, creating an endless
recursion.

R=verwaest@chromium.org,haraken@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2449783006
Cr-Commit-Position: refs/heads/master@{#40648}
2016-10-28 14:40:11 +00:00
yangguo
39ed137bce [serializer] introduce API to serialize internal fields
See https://goo.gl/C9U1dL

BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2452333002
Cr-Commit-Position: refs/heads/master@{#40623}
2016-10-27 13:35:36 +00:00
mtrofin
91a5a219d4 [wasm] Avoid double-serializing the wire bytes
Since the public API for deserialization is now just DeserializeOrCompile,
we can trickle down the wire bytes to the deserialization logic, and
avoid the need for duplicating the wire bytes when serializing.

BUG=chromium:657316

Review-Url: https://chromiumcodereview.appspot.com/2433273002
Cr-Commit-Position: refs/heads/master@{#40516}
2016-10-22 15:15:04 +00:00
heimbuef
ef690ca387 Constrain the zone segment pool size
Added a size constraint to the configuration to limit the segment pool.
This will likely fix the memory alerts from small android devices.

BUG=chromium:655129

Review-Url: https://chromiumcodereview.appspot.com/2424393002
Cr-Commit-Position: refs/heads/master@{#40476}
2016-10-20 14:48:55 +00:00
mtrofin
2282dd0941 [wasm] remove deprecated deserialization API
We don't need the Deserialize API taking in a SerializedData anymore.

BUG=

Review-Url: https://chromiumcodereview.appspot.com/2436543004
Cr-Commit-Position: refs/heads/master@{#40473}
2016-10-20 14:19:30 +00:00
ishell
73460009a6 [ic] Support data handlers that represent loads from prototypes.
This CL also adds separate runtime call stats buckets for data handlers.

BUG=

Review-Url: https://codereview.chromium.org/2419513002
Cr-Commit-Position: refs/heads/master@{#40281}
2016-10-13 16:19:24 +00:00
jochen
29ddd7ff82 Fix import/export annotations for v8 targets that are always static
Instead of suppressing the linker warnings and disallowing incremental
linking, just fix the annotations..

R=machenbach@chromium.org,jgruber@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2420603002
Cr-Commit-Position: refs/heads/master@{#40260}
2016-10-13 12:44:36 +00:00
gsathya
6f94a8f1c7 [promises] Move PromiseReactionJob to c++
This patch results in a 11% improvement over 5 runs in the
bluebird benchmark.

BUG=v8:5343,v8:5046
TBR=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2406343002
Cr-Commit-Position: refs/heads/master@{#40239}
2016-10-12 20:45:57 +00:00
mtrofin
38ac7fe658 [wasm] API renames for wasm serialization/deserialization
This incorporates recent feedback:
- simpler deserialization API by dropping the std::unique_ptr.
The only purpose there was communicating to the caller that they
own the buffer, and that the deserializer won't delete it. The new
design communicates that through a naming choice.
- renamed *UncompiledBytes to *WasmWireBytes

BUG=

Review-Url: https://codereview.chromium.org/2411263004
Cr-Commit-Position: refs/heads/master@{#40238}
2016-10-12 20:11:29 +00:00
fmeawad
610fe2892b [Tracing] Remove State Sampling Profiling
The state sampling was implemented in chrome, we had an interface for it
V8 but it was not implemented yet.
The chrome version version has been removed in
https://codereview.chromium.org/2406703002/
Therefore following up with its removal in V8 as well.

This CL can land independent of the Chromium related CL.

R=primiano@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2410523002
Cr-Commit-Position: refs/heads/master@{#40232}
2016-10-12 15:34:51 +00:00
adamk
9d2051fc28 [modules] Store Module metadata in per-Context EmbedderData
This is a re-land of https://codereview.chromium.org/2393303002/ with
an additional call to DisposeModuleEmbedderData() added to fix lsan failures.

Unifies the approaches used for storing the specifier -> module mapping
and the module -> directory mapping, using std::unordered_maps for both
and storing them per-Context.

This requires adding a method to the v8::Module API to get a hash code
for a Module, but allows slimming down the API in return: gone are
SetEmbedderData/GetEmbedderData, along with the fourth argument
to ResolveModuleCallback.

Besides a simpler API, this allows d8 to get closer to the HTML loader,
which requires each Realm to have a persistent module map (though this
capability is not yet exercised by any tests).

BUG=v8:1569
TBR=neis@chromium.org,jochen@chromium.org

Review-Url: https://codereview.chromium.org/2405313002
Cr-Commit-Position: refs/heads/master@{#40186}
2016-10-11 19:22:25 +00:00
adamk
127798897f Revert of [modules] Store Module metadata in per-Context EmbedderData (patchset #7 id:120001 of https://codereview.chromium.org/2393303002/ )
Reason for revert:
Fails under LeakSanitizer on auto-roll fyi bot:

https://build.chromium.org/p/client.v8.fyi/builders/Auto-roll%20-%20release%20process/builds/49447

Original issue's description:
> [modules] Store Module metadata in per-Context EmbedderData
>
> Unifies the approaches used for storing the specifier -> module mapping
> and the module -> directory mapping, using std::unordered_maps for both
> and storing them per-Context.
>
> This requires adding a method to the v8::Module API to get a hash code
> for a Module, but allows slimming down the API in return: gone are
> SetEmbedderData/GetEmbedderData, along with the fourth argument
> to ResolveModuleCallback.
>
> Besides a simpler API, this allows d8 to get closer to the HTML loader,
> which requires each Realm to have a persistent module map (though this
> capability is not yet exercised by any tests).
>
> BUG=v8:1569
>
> Committed: https://crrev.com/9cf8fce74cf6e7afd6aea3f3545f6bb61572f277
> Cr-Commit-Position: refs/heads/master@{#40133}

TBR=jochen@chromium.org,neis@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2406973003
Cr-Commit-Position: refs/heads/master@{#40145}
2016-10-11 00:25:12 +00:00
adamk
9cf8fce74c [modules] Store Module metadata in per-Context EmbedderData
Unifies the approaches used for storing the specifier -> module mapping
and the module -> directory mapping, using std::unordered_maps for both
and storing them per-Context.

This requires adding a method to the v8::Module API to get a hash code
for a Module, but allows slimming down the API in return: gone are
SetEmbedderData/GetEmbedderData, along with the fourth argument
to ResolveModuleCallback.

Besides a simpler API, this allows d8 to get closer to the HTML loader,
which requires each Realm to have a persistent module map (though this
capability is not yet exercised by any tests).

BUG=v8:1569

Review-Url: https://codereview.chromium.org/2393303002
Cr-Commit-Position: refs/heads/master@{#40133}
2016-10-10 17:37:51 +00:00
jochen
c59cf8cd21 Turn libplatform into a component
BUG=v8:5412
R=jgruber@chromium.org,machenbach@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_dbg_ng;master.tryserver.chromium.android:android_clang_dbg_recipe

Review-Url: https://codereview.chromium.org/2372983003
Cr-Commit-Position: refs/heads/master@{#40111}
2016-10-10 08:52:06 +00:00
mtrofin
cc02e74320 [wasm] Avoid copying when deserializing wasm
Updated the deserialization API to avoid copying uncompiled
bytes.

BUG=

Review-Url: https://codereview.chromium.org/2404673002
Cr-Commit-Position: refs/heads/master@{#40108}
2016-10-10 04:12:45 +00:00
neis
0d2830a265 Minor comment fixes.
R=adamk@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2394173002
Cr-Commit-Position: refs/heads/master@{#40069}
2016-10-07 08:23:48 +00:00
mtrofin
917ef616cc [wasm] Support recompilation if deserialization fails.
One step closer to the informally-agreed upon specification
that structured cloning will always succeed, meaning, if
we fail to deserialize (e.g. because version mismatch in
serialized format and v8 version), we recompile.

As part of this work, the deserializer will need to become
more resilient to invalid input data, and fail graciously
rather than CHECK-ing. This CL addresses some of that,
sufficient to unblock the current serialization tests.
Subsequent CLs will add more testing and the appropriate
fixes.

BUG=639090

Review-Url: https://codereview.chromium.org/2395793003
Cr-Commit-Position: refs/heads/master@{#40058}
2016-10-06 19:33:57 +00:00
alph
4b575dfcef [profiler] Tracing-based CPU profiler.
A new V8 API object v8::TracingCpuProfiler is introduced.
Client can create it on an isolate to enable JS CPU profiles collected
during tracing session.

Once the v8.cpu_profile2 tracing category is enabled the profiler emits
CpuProfile and CpuProfileChunk events with the profile data.

BUG=chromium:406277

Review-Url: https://codereview.chromium.org/2396733002
Cr-Commit-Position: refs/heads/master@{#40054}
2016-10-06 18:14:24 +00:00
hablich
eeaa239889 Update version to 5.6
TBR=machenbach@chromium.org
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2397153002
Cr-Commit-Position: refs/heads/master@{#40037}
2016-10-06 13:22:54 +00:00
jbroman
5fa2734d39 ValueSerializer: Expose reading/writing doubles to embedder.
BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2386233002
Cr-Commit-Position: refs/heads/master@{#39955}
2016-10-04 13:44:41 +00:00
alph
e4e3650e8b [profiler] Introduce Tracing CPU profiler V8 API.
Tracing CPU profiler allows V8 to automatically collect CPU profile when tracing
is started with category v8.cpu_profile2 enabled.

BUG=chromium:406277

Review-Url: https://codereview.chromium.org/2378143003
Cr-Commit-Position: refs/heads/master@{#39855}
2016-09-29 09:25:21 +00:00
franzih
c5e735deac [tracing] Simplify include statement.
Change include statement, otherwise embedders have problems compiling.

BUG=

Review-Url: https://codereview.chromium.org/2378773004
Cr-Commit-Position: refs/heads/master@{#39850}
2016-09-29 07:02:30 +00:00
hlopko
0698f10661 Introduce EmbedderReachableReferenceReporter
This cl introduces reporter to the embedder heap tracer. Heap tracer uses
reporter to report reachable objects from embedder heap. This refactoring is a
step towards being able to take heap snapshots with wrapper tracing.

LOG=no
BUG=468240

Review-Url: https://codereview.chromium.org/2371733002
Cr-Commit-Position: refs/heads/master@{#39824}
2016-09-28 12:55:12 +00:00
franzih
ab486146d4 [api] Add documentation for various HasProperty functions.
Add documentation for Has(), HasOwnProperty(), and HasRealNamedProperty()
that points out their differences and links to the other functions.

BUG=v8:5433

Review-Url: https://codereview.chromium.org/2365403003
Cr-Commit-Position: refs/heads/master@{#39818}
2016-09-28 09:57:46 +00:00
alph
fcf1bac99a [tracing] Implement Add/RemoveTraceStateObserver for default platform.
BUG=chromium:406277

Review-Url: https://codereview.chromium.org/2369073003
Cr-Commit-Position: refs/heads/master@{#39794}
2016-09-27 20:12:55 +00:00
alph
4810f41a52 [tracing] Support ConvertableToTraceFormat argument type.
Drive-by: Use perfect forwarding for AddTraceEvent arguments.

BUG=406277

Committed: https://crrev.com/dcac49af485fe5d4c0027f153901435dbb29c232
Review-Url: https://codereview.chromium.org/2367603002
Cr-Original-Commit-Position: refs/heads/master@{#39742}
Cr-Commit-Position: refs/heads/master@{#39789}
2016-09-27 18:08:53 +00:00
haraken
9285e66630 Add v8::Object::CreationContext that works for a persistent handle
I need this API for https://codereview.chromium.org/1609343002/.

BUG=483722

Review-Url: https://codereview.chromium.org/1627233002
Cr-Commit-Position: refs/heads/master@{#39775}
2016-09-27 14:19:46 +00:00
machenbach
2c9661a62a Revert of [tracing] Support ConvertableToTraceFormat argument type. (patchset #5 id:80001 of https://codereview.chromium.org/2367603002/ )
Reason for revert:
Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/10100

See also:
https://github.com/v8/v8/wiki/Blink%20layout%20tests

Original issue's description:
> [tracing] Support ConvertableToTraceFormat argument type.
>
> Drive-by: Use perfect forwarding for AddTraceEvent arguments.
>
> BUG=406277
>
> Committed: https://crrev.com/dcac49af485fe5d4c0027f153901435dbb29c232
> Cr-Commit-Position: refs/heads/master@{#39742}

TBR=jochen@chromium.org,caseq@chromium.org,fmeawad@chromium.org,alph@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=406277

Review-Url: https://codereview.chromium.org/2371103002
Cr-Commit-Position: refs/heads/master@{#39750}
2016-09-27 07:02:02 +00:00
alph
dcac49af48 [tracing] Support ConvertableToTraceFormat argument type.
Drive-by: Use perfect forwarding for AddTraceEvent arguments.

BUG=406277

Review-Url: https://codereview.chromium.org/2367603002
Cr-Commit-Position: refs/heads/master@{#39742}
2016-09-26 21:54:56 +00:00
littledan
713e247e7d Add method on Value::IsAsyncFunction to detect async functions
DevTools wants to be able to detect async functions in order to print
their synopsis better in stack traces and tooltips. This patch provides a
simple method to do the check.

BUG=v8:4483

Review-Url: https://codereview.chromium.org/2365833002
Cr-Commit-Position: refs/heads/master@{#39687}
2016-09-23 18:31:33 +00:00
adamk
3bbd11c233 [modules] Do path resolution relative to each module file in d8
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2361593002
Cr-Commit-Position: refs/heads/master@{#39646}
2016-09-22 21:03:42 +00:00
kozyatinskiy
e882623820 [inspector] fixed all shorten-64-to-32 warnings
BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Committed: https://crrev.com/3d10918d2e1c57d72531c55a956262f5a72fceaa
Review-Url: https://codereview.chromium.org/2332163002
Cr-Original-Commit-Position: refs/heads/master@{#39426}
Cr-Commit-Position: refs/heads/master@{#39610}
2016-09-22 01:48:10 +00:00
gsathya
8c87ae9b88 [promises] Move PromiseResolveThenableJob to c++
- Add a new container object to store the data required for
PromiseResolveThenableJob.

- Create a new runtime function to enqueue the microtask event with
the required data.

This patches causes a 4% regression in the bluebird benchmark.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2314903004
Cr-Commit-Position: refs/heads/master@{#39571}
2016-09-21 03:49:50 +00:00
adamk
cf127e8144 [modules] Expand API to allow linking and use it in d8
This patch gives the ability for the embedder to ask for the
module requests of a module, and to pass a ResolveCallback
into Module::Instantiate().

In d8, I've implemented a simple module_map that's used
along with this API to allow loading, compiling, instantiating,
and evaluating a whole tree of modules.

No path resolution is yet implemented, meaning that all
import paths are relative to whatever directory d8 runs
in. And no imports are linked to the exports of the
requested module.

BUG=v8:1569

Review-Url: https://codereview.chromium.org/2351113004
Cr-Commit-Position: refs/heads/master@{#39569}
2016-09-20 23:39:41 +00:00
jgruber
4f5695229e [d8] Fix the shared-library build
This commit ensures that the d8 shared library build uses the same logic as
the standard static build by exporting relevant functions and classes.

BUG=chromium:646337

Committed: https://crrev.com/2c10ca8086a4d595ecf9aa843d2031b068470d65
Review-Url: https://codereview.chromium.org/2342563002
Cr-Original-Commit-Position: refs/heads/master@{#39503}
Cr-Commit-Position: refs/heads/master@{#39547}
2016-09-20 12:06:54 +00:00
machenbach
298ee9cde1 Revert of [d8] Fix the shared-library build (patchset #12 id:20002 of https://codereview.chromium.org/2342563002/ )
Reason for revert:
Unblocking roll

Original issue's description:
> [d8] Fix the shared-library build
>
> This commit ensures that the d8 shared library build uses the same logic as
> the standard static build by exporting relevant functions and classes.
>
> BUG=chromium:646337
>
> Committed: https://crrev.com/2c10ca8086a4d595ecf9aa843d2031b068470d65
> Cr-Commit-Position: refs/heads/master@{#39503}

TBR=jochen@chromium.org,vogelheim@chromium.org,bmeurer@chromium.org,titzer@chromium.org,jgruber@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:646337

Review-Url: https://codereview.chromium.org/2356703003
Cr-Commit-Position: refs/heads/master@{#39526}
2016-09-20 07:13:27 +00:00
alph
ce03778926 [tracing] Introduce TraceStateObserver interface to the platform.
Introduce TraceStateObserver interface along with add/remove
methods to the platform.

BUG=chromium:406277

Review-Url: https://codereview.chromium.org/2344893005
Cr-Commit-Position: refs/heads/master@{#39513}
2016-09-19 21:01:32 +00:00
jgruber
2c10ca8086 [d8] Fix the shared-library build
This commit ensures that the d8 shared library build uses the same logic as
the standard static build by exporting relevant functions and classes.

BUG=chromium:646337

Review-Url: https://codereview.chromium.org/2342563002
Cr-Commit-Position: refs/heads/master@{#39503}
2016-09-19 12:47:22 +00:00
adamk
aa6db9d990 [modules] Introduce v8::Module to the API and return it from CompileModule
R=neis@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2347933002
Cr-Commit-Position: refs/heads/master@{#39481}
2016-09-16 21:47:54 +00:00
neis
7c05d8a4a6 [modules] Turn JSModule into Module.
Rename JSModule to Module and make it a Struct rather than a JSObject.  We will
later add a separate JSModuleNamespace object to implement the 'import * as foo'
syntax.

BUG=v8:1569

Review-Url: https://codereview.chromium.org/2345823002
Cr-Commit-Position: refs/heads/master@{#39477}
2016-09-16 16:47:56 +00:00
hablich
4b8f6543f4 Revert of [inspector] fixed all shorten-64-to-32 warnings (patchset #4 id:80001 of https://codereview.chromium.org/2332163002/ )
Reason for revert:
Blocking V8 roll: https://codereview.chromium.org/2347463002/

See https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/293368 for compile error.

Original issue's description:
> [inspector] fixed all shorten-64-to-32 warnings
>
> BUG=chromium:635948
> R=dgozman@chromium.org,alph@chromium.org
>
> Committed: https://crrev.com/3d10918d2e1c57d72531c55a956262f5a72fceaa
> Cr-Commit-Position: refs/heads/master@{#39426}

TBR=jochen@chromium.org,alph@chromium.org,dgozman@chromium.org,kozyatinskiy@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:635948

Review-Url: https://codereview.chromium.org/2339173004
Cr-Commit-Position: refs/heads/master@{#39432}
2016-09-15 00:42:06 +00:00
kozyatinskiy
3d10918d2e [inspector] fixed all shorten-64-to-32 warnings
BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2332163002
Cr-Commit-Position: refs/heads/master@{#39426}
2016-09-14 18:25:00 +00:00
jbroman
d825492bb6 Support delegating serialization of host objects.
This exposes an interface for the embedder to provide a delegate which can
serialize or deserialize embedder-specific objects, like Blink's DOM wrappers.

BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2327653002
Cr-Commit-Position: refs/heads/master@{#39422}
2016-09-14 16:42:07 +00:00
alph
5465c25cea Add two CpuProfileNode API functions to allow thread safe access to the node.
GetFunctionNameStr and GetScriptResourceNameStr can be called from a thread
other than isolate VM thread unlike their conterparts GetFunctionName
and GetScriptResourceName.

BUG=406277

Review-Url: https://codereview.chromium.org/2328673003
Cr-Commit-Position: refs/heads/master@{#39313}
2016-09-09 15:51:02 +00:00
franzih
16f34a416e [api] Add documentation for IndexedPropertyCallbacks.
BUG=v8:5260

Review-Url: https://codereview.chromium.org/2322673004
Cr-Commit-Position: refs/heads/master@{#39310}
2016-09-09 14:11:34 +00:00
franzih
b0a7738a5f [api] Add interceptor for getOwnPropertyDescriptor().
The existing PropertyQueryCallback intercepts getOwnPropertyDescriptor, but
it returns only value and attributes, not the accessors. This
PropertyDescriptorCallback returns a descriptor similar to Ecma-262 6.2.4.

You can either set a PropertyQueryCallback or a PropertyDescriptorCallback,
but not both. When you set a callback for DefineProperty(), you can set a
PropertyDescriptorCallback but not a PropertyQueryCallback.

BUG=v8:5359

Review-Url: https://codereview.chromium.org/2311873002
Cr-Commit-Position: refs/heads/master@{#39279}
2016-09-08 12:51:49 +00:00
franzih
9048298d4c [api] Fix typo.
BUG=

Review-Url: https://codereview.chromium.org/2315413002
Cr-Commit-Position: refs/heads/master@{#39259}
2016-09-07 18:55:40 +00:00
dgozman
81b7e77ff0 [inspector] Build inspector under v8_enable_inspector build flag.
- inspector becomes a dependency of v8_base;
- generated public protocol files are placed to gen/v8/include/inspector/<Domain.h>;
- added v8_enable_inspector_override to be used in embedders (gn only);
- combined public headers into v8-inspector.h and v8-inspector-protocol.h.

BUG=chromium:635948

Review-Url: https://codereview.chromium.org/2292053003
Cr-Commit-Position: refs/heads/master@{#39226}
2016-09-06 23:26:35 +00:00
franzih
2b13976820 [api] Rename parameter for consistency.
BUG=

Review-Url: https://codereview.chromium.org/2311913002
Cr-Commit-Position: refs/heads/master@{#39218}
2016-09-06 16:35:53 +00:00
franzih
ca6c87341f [api] Improve documentation for PropertyDeleterCallback.
BUG=v8:5260

Review-Url: https://codereview.chromium.org/2312863003
Cr-Commit-Position: refs/heads/master@{#39215}
2016-09-06 15:54:00 +00:00
jbroman
5a97e95520 Handle errors in v8::ValueDeserializer by throwing exceptions.
This restores the contract that all API methods that return Maybe<T> or
MaybeLocal<T> always throw an exception when they return nothing.

Since v8::ValueDeserializer::ReadHeader can now throw exceptions, it
needs a Local<Context> parameter so that it can set up execution state
(entering the context, etc.). The old method has been marked for
deprecation, but since this API is experimental I intend to remove it
as soon as I've removed the use from Blink.

value-serializer-unittest has been updated to expect an exception in
all decode failure cases.

BUG=chromium:148757,chromium:641964

Review-Url: https://codereview.chromium.org/2308053002
Cr-Commit-Position: refs/heads/master@{#39188}
2016-09-06 03:24:53 +00:00
jbroman
f72351f540 Throw exceptions for errors in v8::ValueSerializer.
BUG=chromium:148757,chromium:641964

Review-Url: https://codereview.chromium.org/2307603002
Cr-Commit-Position: refs/heads/master@{#39140}
2016-09-02 15:17:07 +00:00
franzih
d9a026e628 [api] Minor improvement to documentation for kNonMasking.
BUG=

Review-Url: https://codereview.chromium.org/2302133003
Cr-Commit-Position: refs/heads/master@{#39137}
2016-09-02 13:16:10 +00:00
franzih
7c401bd84c [api] Add interceptor for defineProperty().
With the Indexed/GenericNamedPropertyDefinerCallback it is possible to intercept Object.defineProperty() calls.

Requests that call JSReceiver::OrdinaryDefineOwnProperty() internally, also trigger the interceptor. This includes Object.freeze(), Object.preventExtensions(), and Object.seal().

As without this patch, the query interceptor triggers on
defineProperty, unless the definer callback
intercepts the request.

As without this patch, the query interceptor triggers on defineProperty, unless the definer callback intercepts the request.

BUG=

Committed: https://crrev.com/b9d985975cf3bab0ded0cec9fafd3799f9bde29a
Review-Url: https://codereview.chromium.org/2272383002
Cr-Original-Commit-Position: refs/heads/master@{#39094}
Cr-Commit-Position: refs/heads/master@{#39122}
2016-09-02 09:09:08 +00:00
jkummerow
9fe4efe5b8 Revert of [api] Add interceptor for defineProperty(). (patchset #9 id:160001 of https://codereview.chromium.org/2272383002/ )
Reason for revert:
Breaks cctest/test-api-interceptors/QueryInterceptor on the waterfall

Original issue's description:
> [api] Add interceptor for defineProperty().
>
> With the Indexed/GenericNamedPropertyDefinerCallback it is possible to intercept Object.defineProperty() calls.
>
> Requests that call JSReceiver::OrdinaryDefineOwnProperty() internally, also trigger the interceptor. This includes Object.freeze(), Object.preventExtensions(), and Object.seal().
>
> BUG=
>
> Committed: https://crrev.com/b9d985975cf3bab0ded0cec9fafd3799f9bde29a
> Cr-Commit-Position: refs/heads/master@{#39094}

TBR=jochen@chromium.org,franzih@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2303533004
Cr-Commit-Position: refs/heads/master@{#39095}
2016-09-01 16:04:00 +00:00
franzih
b9d985975c [api] Add interceptor for defineProperty().
With the Indexed/GenericNamedPropertyDefinerCallback it is possible to intercept Object.defineProperty() calls.

Requests that call JSReceiver::OrdinaryDefineOwnProperty() internally, also trigger the interceptor. This includes Object.freeze(), Object.preventExtensions(), and Object.seal().

BUG=

Review-Url: https://codereview.chromium.org/2272383002
Cr-Commit-Position: refs/heads/master@{#39094}
2016-09-01 15:18:30 +00:00
franzih
8acb7ab9f1 [api] Add PropertyDescriptor and DefineProperty().
BUG=

Review-Url: https://codereview.chromium.org/2244123005
Cr-Commit-Position: refs/heads/master@{#39093}
2016-09-01 15:09:59 +00:00
franzih
8225465b09 [api] Add documentation for PropertyQueryCallback.
Also add tests that document the behavior of the PropertyQueryCallback.

BUG=v8:5260

Review-Url: https://codereview.chromium.org/2286323002
Cr-Commit-Position: refs/heads/master@{#39090}
2016-09-01 14:41:56 +00:00
jbroman
e2361954e5 Blink-compatible serialization of SharedArrayBuffer.
BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2290753002
Cr-Commit-Position: refs/heads/master@{#39017}
2016-08-30 14:05:49 +00:00
daniel.bevenius
47bcea99fb Updating comment for Proxy::New function
The comment for the Proxy::New functions seems inaccurate and is
currently identical to Map::New:

3090   /**
3091    * Creates a new empty Map.
3092    */
3093   static Local<Map> New(Isolate* isolate);

This commit updates the comment to describe that it creates a Proxy and
not a Map.

BUG=

Review-Url: https://codereview.chromium.org/2176063002
Cr-Commit-Position: refs/heads/master@{#39002}
2016-08-30 09:43:53 +00:00
mlippautz
0f01a5881f [api] Add NumberOfWrappersToTrace to EmbedderHeapTracer.
V8 can use this metter to better estimate the amount of work that is still to be
done by the embedder. Supposed to be used to decide whether incremental marking
should be finalized or not.

BUG=chromium:468240
R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2291613002
Cr-Commit-Position: refs/heads/master@{#38985}
2016-08-29 15:38:51 +00:00
franzih
25e2d1588e [api] Add documentation for the PropertyAttribute enum.
Add comments to make it easier to browse the HTML documentation generated with Doxygen.

BUG=v8:5260

Review-Url: https://codereview.chromium.org/2290553003
Cr-Commit-Position: refs/heads/master@{#38982}
2016-08-29 13:22:37 +00:00
franzih
97118fb504 [api] Improve documentation for NamedPropertyGetterCallback.
BUG=v8:5260

Review-Url: https://codereview.chromium.org/2277513003
Cr-Commit-Position: refs/heads/master@{#38951}
2016-08-26 17:14:15 +00:00