Commit Graph

902 Commits

Author SHA1 Message Date
machenbach
c5797f859a Revert of deprecate non-phantom weak callbacks (patchset #1 id:1 of https://codereview.chromium.org/1103173002/)
Reason for revert:
[Sheriff] Fails compilation on chromium android:
http://build.chromium.org/p/client.v8/builders/Android%20Builder/builds/4131

Is the chromium version our builder used maybe too old (it uses lkcr)? In that case please reland as soon as it's up-to-date.

Original issue's description:
> deprecate non-phantom weak callbacks
>
> BUG=
>
> Committed: https://crrev.com/39c31da2142ab0fca9dae279b9e59cd4951a1982
> Cr-Commit-Position: refs/heads/master@{#28077}

TBR=jochen@chromium.org,dcarney@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28079}
2015-04-27 13:30:19 +00:00
dcarney
39c31da214 deprecate non-phantom weak callbacks
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28077}
2015-04-27 13:06:18 +00:00
dcarney
202a97c88e make Handle a synonym of Local
R=svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27951}
2015-04-21 08:15:57 +00:00
jochen
ad854ea11e Allow for accessing an ArrayBuffer contents without externalizing it
The embedder has to take appropriate steps to ensure that the
ArrayBuffer doesn't die while it's accessing the pointer, e.g. keep a
Local handle to it around

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

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

Cr-Commit-Position: refs/heads/master@{#27942}
2015-04-20 15:01:43 +00:00
jochen
53cc6486df Remove support for externally backed elements from the API
Embedders should use ArrayBuffers instead

BUG=v8:3996
LOG=y
R=verwaest@chromium.org,dslomov@chromium.org,kbr@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27939}
2015-04-20 13:31:27 +00:00
jochen
36f17ed030 Deprecate 3-args ResourceConstraints::ConfigureDefaults
Embedders should use the 2-args version. Number of cores is just
ignored.

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

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

Cr-Commit-Position: refs/heads/master@{#27938}
2015-04-20 13:26:21 +00:00
ssid
4a597f527a Adding missing V8_EXPORT flag in SpaceStatistics class in v8.h
This class was added in crrev.com/1058253003 and missed V8_EXPORT in
definition.

BUG=466141, 476013
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27926}
2015-04-17 19:33:13 +00:00
ssid
281d30d758 Adding V8 api to get memory statistics of spaces in V8::Heap.
This is first step towards adding V8 heap statistics to the memory
tracing infrastructure. For being able to get useful memory number into
the memory dump, v8 needs to provide an external api needs to obtain
more information about the heap. So, this Cl extends the api to give
information about the memory allocated and used in the spaces.

BUG=466141, 476013
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27919}
2015-04-17 14:04:24 +00:00
jochen
47cca4684e Remove support for specifying the number of available threads
The embedder can control how many threads it wants to use via the
v8::Platform implementation. V8 internally doesn't spin up threads
anymore. If the embedder doesn't want to use any threads at all, it's
v8::Platform implementation must either run the background jobs on
the foreground thread, or the embedder should specify --predictable

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

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

Cr-Commit-Position: refs/heads/master@{#27833}
2015-04-15 07:15:43 +00:00
jochen
ac23150fd2 When converting Maybe and MaybeLocal values with a check, always check
An embedder that wants to avoid the check should use MaybeLocal::ToLocal.

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

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

Cr-Commit-Position: refs/heads/master@{#27832}
2015-04-15 07:11:50 +00:00
jochen
ada32ae636 Expose ArrayBufferView::HasBuffer
This allows the embedder to decide whether it's worthwhile to copy the
contents to avoid materializing a buffer.

BUG=v8:3996
R=dslomov@chromium.org,kbr@chromium.org
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27782}
2015-04-13 11:27:58 +00:00
fedor
1f85559a69 api: introduce SealHandleScope
When debugging Handle leaks in io.js we found it very convenient to be
able to Seal some specific (root in our case) scope to prevent Handle
allocations in it, and easily find leakage.

R=yangguo
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27766}
2015-04-10 23:17:09 +00:00
verwaest
4bd9bdbb28 Reland "Merge cellspace into old pointer space"
This fixes the arm(64) and mips(64) write barriers

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27751}
2015-04-10 13:54:10 +00:00
jochen
f56fb72f98 Special case the "empty string" root so it doesn't constantly jump around
BUG=none
R=hpayer@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27736}
2015-04-10 09:23:44 +00:00
adamk
9e3e0aaa88 Revert of Merge cellspace into old pointer space (patchset #8 id:180001 of https://codereview.chromium.org/1010803012/)
Reason for revert:
Causes test failures on ARM bots related to cells and write barriers.

Original issue's description:
> Merge cellspace into old pointer space
>
> BUG=
>
> Committed: https://crrev.com/4e7163ce05f135918205c7855ae60a48e5d46cc5
> Cr-Commit-Position: refs/heads/master@{#27707}

TBR=hpayer@chromium.org,balazs.kilvady@imgtec.com,yangguo@chromium.org,verwaest@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27711}
2015-04-09 18:16:40 +00:00
verwaest
4e7163ce05 Merge cellspace into old pointer space
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27707}
2015-04-09 13:34:21 +00:00
hpayer
59be4ba7f4 Reland "Merge old data and pointer space."
This reverts commit cbfcee5575.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27623}
2015-04-07 11:32:10 +00:00
jkummerow
90cbede588 Move prototype metadata from internal properties to prototype maps
The motivation is that we prefer to avoid creating internal properties, and we have a usable field on maps ("transitions", which is not used for prototype maps).
This CL also ensures the invariant that prototype maps are never shared, even if they are in dictionary mode.

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

Cr-Commit-Position: refs/heads/master@{#27617}
2015-04-07 10:42:57 +00:00
dcarney
9038004932 Revert of make ToLocalCheck crash in release mode (patchset #1 id:1 of https://codereview.chromium.org/1043363005/)
Reason for revert:
breaks some devtools things

Original issue's description:
> make ToLocalCheck crash in release mode
>
> R=svenpanne@chromium.org
> BUG=
>
> Committed: https://crrev.com/ce7cc5119c1e031bf1eb8476fbf5e55bef738f94
> Cr-Commit-Position: refs/heads/master@{#27585}

TBR=svenpanne@chromium.org,machenbach@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27589}
2015-04-02 13:09:28 +00:00
dcarney
ce7cc5119c make ToLocalCheck crash in release mode
R=svenpanne@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27585}
2015-04-02 10:59:51 +00:00
jochen
2a5eb8299b Expose an API on ArrayBufferView to copy out content w/o changing the buffer
BUG=v8:3996
LOG=y
R=dslomov@chromium.org,kbr@chromium.org,hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27580}
2015-04-02 09:36:39 +00:00
adamk
729b85ae86 Add a UseCounter for Object.observe
It triggers once per context that calls observe (or attempts to access
any observation metadata, e.g. through Object.getNotifier).

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

Cr-Commit-Position: refs/heads/master@{#27557}
2015-03-31 23:03:19 +00:00
jochen
3fbc0cb79a Deprecate IdleNotification()
Embedders should use IdleNotificationDeadline()

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

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

Cr-Commit-Position: refs/heads/master@{#27550}
2015-03-31 17:11:21 +00:00
erikcorry
de9c3e59f0 Record various overflow events on the heap - reland of 1029323003
R=hpayer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27520}
2015-03-30 11:56:36 +00:00
dcarney
f303b81bde ensure maybe results are checked in v8.h
also some drive-by handlescope fixes in api.cc

R=svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27510}
2015-03-30 09:16:07 +00:00
dcarney
a45a1de7aa add access checks to receivers on function callbacks
R=verwaest@chromium.org
BUG=468451
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27482}
2015-03-26 15:22:08 +00:00
dcarney
2455aadf7b two pass phantom collection
R=jochen@chromium.org, erikcorry@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27475}
2015-03-26 11:50:28 +00:00
yurys
a037a44582 Remove v8::Isolate::ClearInterrupt
The method was deprecated a while ago: https://crrev.com/87e4bba31eabfd3b12e42b5886dc9da08d2daf13

LOG=Y
BUG=YES
API=Remove v8::Isolate::ClearInterrupt

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

Cr-Commit-Position: refs/heads/master@{#27449}
2015-03-25 15:32:15 +00:00
machenbach
96cfadd505 Revert of Track how many pages trigger fallback strategies in GC (patchset #2 id:20001 of https://codereview.chromium.org/1029323003/)
Reason for revert:
This seems to cause lots of crashes in layout tests debug:
../../third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp(67) : void blink::useCounterCallback(v8::Isolate *, v8::Isolate::UseCounte

http://build.chromium.org/p/client.v8/builders/V8-Blink%20Linux%2064%20%28dbg%29/builds/2332

Original issue's description:
> Track how many pages trigger fallback strategies in GC
>
> R=hpayer@chromium.org
> BUG=
>
> Committed: https://crrev.com/bb880058f6499510cff12d98dc7d524d35d769cb
> Cr-Commit-Position: refs/heads/master@{#27421}

TBR=hpayer@chromium.org,erikcorry@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27427}
2015-03-24 22:02:37 +00:00
erikcorry
bb880058f6 Track how many pages trigger fallback strategies in GC
R=hpayer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27421}
2015-03-24 16:17:57 +00:00
dcarney
adeb82ef23 fix disposal of phantom handles in GlobalValueMap
additionally, add a drive by fix to WeakCallbackInfo

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

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27407}
2015-03-24 13:22:15 +00:00
jochen
d19d0be8a0 Remove calls to IdleNotification()
All users should use IdleNotificationDeadline() instead

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

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

Cr-Commit-Position: refs/heads/master@{#27386}
2015-03-24 08:30:02 +00:00
verwaest
79c5948b16 Remove reference to PropertyCellSpace from include/v8.h
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27371}
2015-03-23 14:59:11 +00:00
hpayer
cbfcee5575 Revert "Merge old data and pointer space."
TBR=verwaest@chromium.org,ulan@chromium.org,ishell@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27323}
2015-03-19 22:03:32 +00:00
dslomov
f1d970a4ae Add a counter for legacy const.
Only adds a counter id, does not count anything.

R=jochen@chromium.org
BUG=v8:3942
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27313}
2015-03-19 14:17:42 +00:00
jochen
5d8e3bfaff Clarify what APIs return Maybe and MaybeLocal values
If the Maybe is nothing or the MaybeLocal is empty, it means that the
API call either threw an exception or an exception was already pending.

In that case, the embedder needs to handle the exception or otherwise
react to the failed API call.

BUG=v8:3929
R=svenpanne@chromium.org
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27298}
2015-03-19 12:38:38 +00:00
yurys
c622cb637a Introduce explicit constant for per Context debug data set by embedder
It's value is hardwired in gin[1] and is referenced in Blink[2]. Since it is treated specially by v8 debugger it should be defined in v8 API and referenced in gin and blink..

[1] https://src.chromium.org/viewvc/chrome/trunk/src/gin/public/context_holder.h?r1=239099&r2=239098&pathrev=239099
[2] https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp&q=kDebugIdIndex%20f:V8PerContextData&sq=package:chromium&type=cs

BUG=chromium:466631
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27290}
2015-03-19 08:18:44 +00:00
dcarney
0880d4da26 add interceptors which do not mask existing properties
R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27271}
2015-03-18 12:50:48 +00:00
dcarney
7f38011a04 convert last api functions which try to handle exceptions to maybes
BUG=v8:3929
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27270}
2015-03-18 12:50:28 +00:00
verwaest
16c8485a35 Remove PropertyCell space
Replaces StoreGlobalCell / LoadGlobalCell with NamedField variants that use write barriers.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27269}
2015-03-18 11:43:58 +00:00
vegorov
0e024449b8 Make counter and histogram related callbacks part of the Isolate::CreateParams.
Some native counters (e.g. KeyedLoadGenericSlow) are referenced from stubs that are generated very early in the Isolate lifecycle before v8::Isolate::New returns. Thus counter lookup callback also needs to be installed early prior to v8::internal::Isolate::Init call. Otherwise assembler will just assume that the counter is not enabled and produce no code from IncrementCounter - because address of the counter is not yet available.

Histogram related callbacks are moved for consistency to make them able to collect samples which occur at isolate initialization time.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27262}
2015-03-18 10:15:04 +00:00
hpayer
257ff48931 Merge old data and pointer space.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27259}
2015-03-18 09:39:03 +00:00
dcarney
85a0e8075f convert String::New functions to maybe
R=svenpanne@chromium.org
BUG=v8:3929
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27236}
2015-03-17 11:45:50 +00:00
dcarney
4a99e6f493 add missing dcheck to ToLocalChecked
R=svenpanne@chromium.org
BUG=v8:3929
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27229}
2015-03-17 09:03:50 +00:00
bashi
83245abb6b Add Cast() for Int32 and Uint32
It should be possible to cast a Value to Int32 without throwing an exception
when IsInt32() is true. Same for Uint32.

BUG=chromium:462402
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27156}
2015-03-12 12:27:46 +00:00
mstarzinger
f71e262683 Simplify pending message script handling.
This removes the separate tracking of the pending message script,
because that script is already stored in the message object and
duplicating it in the ThreadLocalTop makes it more brittle.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27127}
2015-03-11 10:02:48 +00:00
dcarney
5234d9977d convert most remaining api functions needing context to maybes
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27126}
2015-03-11 09:33:04 +00:00
bashi
8bdac10631 Add Cast() to Boolean
We should be able to cast a Value to Boolean when IsBoolean() is true.

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

Cr-Commit-Position: refs/heads/master@{#27124}
2015-03-10 23:40:20 +00:00
mstarzinger
37729a52fd Simplify and correctify pending message location handling.
This makes sure that the pending message location is only tracked by
the message object, as only this is saved for finally-blocks. The
location information is duplicated and becomes stale.

R=titzer@chromium.org
TEST=maeh, not so much.

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

Cr-Commit-Position: refs/heads/master@{#27109}
2015-03-10 14:45:26 +00:00
dcarney
66969fb2ad convert Function and Promise to maybe
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27087}
2015-03-10 09:15:59 +00:00