Commit Graph

878 Commits

Author SHA1 Message Date
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
dcarney
60c1ad026d remove phantom naming from the api
since the old style weakness is slated for removal, we might as well reuse the name to limit confusion.  additionally I simplified the callback type to a enum to either get internal field values or not

this should be a non-breaking change with the exception of PhantomPersistentValueMap, which is unused.

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

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27084}
2015-03-09 21:48:09 +00:00
Dan Carney
47154aa8b2 add V8_DEPRECATE_SOON macros to make it easier to identify calls which need deprecation
BUG=
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27061}
2015-03-09 09:49:28 +00:00
kalman
c23035cdd0 Add MoveOnlyTypeForCPP03 to UniquePersistent for compatibility with Chromium.
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27049}
2015-03-06 16:39:16 +00:00
ulan
1b00451f57 Retain maps embedded in optimized code for several garbage collections.
This keeps dying maps alive for FLAG_retain_maps_for_n_gc garbage collections
to increase chances of them being reused for new objects in future and
decrease number of deoptimizations.

BUG=v8:3664
LOG=N
TEST=cctest/test-heap/MapRetaining

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

Cr-Commit-Position: refs/heads/master@{#27040}
2015-03-06 12:36:32 +00:00
dcarney
b9bf2051cd convert more things to maybe
BUG=v8:3929
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27038}
2015-03-06 10:28:15 +00:00
dcarney
00c52d424a reland rename UniquePersistent to Global
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27018}
2015-03-05 13:26:35 +00:00
yurys
e33ae81ce1 Allow passing sourceMapUrl when compiling scripts
According to Source Map specification [1] source map url can be passed either as a magic comment at the end of script or as SourceMap http header. We already parse the former value and expose it on Script object. This change allows to unify the way we deal with source map urls received in http header by providing api for passing that url into the script being compiled.

source_map_url is intentionally not passed into CompilationCacheScript::Lookup. The cache is anyways disabled when debugger is on.

[1] https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit

LOG=Y
BUG=chromium:462572

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

Cr-Commit-Position: refs/heads/master@{#27017}
2015-03-05 13:03:57 +00:00
dcarney
95c1f5ddc8 convert compile functions to use maybe
BUG=v8:3929
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27013}
2015-03-05 12:26:19 +00:00
machenbach
8465f39792 Revert of rename UniquePersistent to Global (patchset #2 id:20001 of https://codereview.chromium.org/980173003/)
Reason for revert:
breaks arm compile

Original issue's description:
> rename UniquePersistent to Global
>
> BUG=
>
> Committed: https://crrev.com/3f5ae16c62b031ad572f750d81ffc71c5d6d1f9b
> Cr-Commit-Position: refs/heads/master@{#27011}

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

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

Cr-Commit-Position: refs/heads/master@{#27012}
2015-03-05 12:10:32 +00:00
dcarney
3f5ae16c62 rename UniquePersistent to Global
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27011}
2015-03-05 11:40:43 +00:00
dcarney
6e189f5ae6 give UniquePersistent full move semantics
BUG=v8:3669
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27004}
2015-03-05 08:30:54 +00:00
dcarney
bde1949744 convert remaining object functions to maybes
BUG=v8:3929
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#26981}
2015-03-04 12:58:40 +00:00
dcarney
6130b02524 convert more object functions to return maybes
R=svenpanne@chromium.org

BUG=v8:3929
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#26952}
2015-03-03 07:14:45 +00:00
Dan Carney
1fcedda668 convert object::* to return maybe values
BUG=v8:3929
LOG=y
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26940}
2015-03-02 13:13:31 +00:00
Sven Panne
602d0dab93 Removed funky Maybe constructor and made fields private.
BUG=v8:3929
LOG=y
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26937}
2015-03-02 12:22:37 +00:00
Sven Panne
30637108dd Polish Maybe API a bit, removing useless creativity and fixing some signatures.
BUG=v8:3929
LOG=y
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26936}
2015-03-02 11:27:05 +00:00
dcarney
8d839ead04 convert Value::*Value() function to return Maybe results
BUG=v8:3929
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26914}
2015-02-27 13:04:49 +00:00
dcarney
2fc51d9cfa Convert v8::Value::To* to use MaybeLocal
BUG=v8:3929
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#26912}
2015-02-27 10:39:41 +00:00
machenbach
9dac60ad2d Add public version macros.
Side note: tools/v8-info.sh seems to have been broken ever
since the move to git.  At least it's not more broken now.

BUG=v8:3075
LOG=y

TEST=./script_test.py

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

Cr-Commit-Position: refs/heads/master@{#26873}
2015-02-26 08:59:23 +00:00
ben
726eb0582b Add v8::Object::GetRealNamedPropertyAttributes()
Add v8::Object::GetRealNamedPropertyAttributes() and
v8::Object::GetRealNamedPropertyAttributesInPrototypeChain().

See https://github.com/iojs/io.js/issues/864 for background.

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

Cr-Commit-Position: refs/heads/master@{#26855}
2015-02-25 15:09:20 +00:00
rossberg
c094da9233 [strong] Make functions and generators non-extensible non-constructors
R=dslomov@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26854}
2015-02-25 14:52:51 +00:00
yangguo
4b5ff0c5e2 Attach snapshot data blob to the isolate.
R=vogelheim@chromium.org
BUG=chromium:461259
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26845}
2015-02-25 11:14:56 +00:00
jochen
58deea0ad0 Make it possible to define arguments for CompileFunctionInContext
Also make sure that the function body really produces only one function literal.

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

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

Cr-Commit-Position: refs/heads/master@{#26617}
2015-02-12 14:39:03 +00:00
ulan
b79b985988 Use weak cells in dependent code.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26614}
2015-02-12 13:21:13 +00:00