Commit Graph

101 Commits

Author SHA1 Message Date
feng@chromium.org
ea48d53bad Add ENABLE_DEBUGGER_SUPPORT macro.
ENABLE_DEBUGGER_SUPPORT is enabled by default unless it is on Android platform.
On Android platform, it can also enabled by passing -DENABLE_DEBUGGER_SUPPORT flag to the compiler.

This should not affect any existing build (I hope, cross my fingers) except the build in real Android environment (in other word, it only affects me now).

There are lot of room for code refactoring in stead of using #ifdef all over the place. I will leave this to v8 folks.

Review URL: http://codereview.chromium.org/77035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-20 16:36:13 +00:00
kasperl@chromium.org
e97c387ec8 Prepare a push to trunk (version 1.1.10).
Review URL: http://codereview.chromium.org/67167

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 13:16:51 +00:00
kasperl@chromium.org
383821854b Prepare a push to trunk (version 1.1.9).
Review URL: http://codereview.chromium.org/73031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 13:29:23 +00:00
kasperl@chromium.org
3b80ddac19 Prepare a push to trunk (version 1.1.8).
Review URL: http://codereview.chromium.org/71001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-11 09:01:45 +00:00
asargent@chromium.org
144cca7d3d Fix v8::Object::DeleteHiddenValue to not bail when there are no hidden properties.
Review URL: http://codereview.chromium.org/58016


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-08 21:05:29 +00:00
kasperl@chromium.org
9c8b187658 Prepare a push to trunk (version 1.1.7).
Review URL: http://codereview.chromium.org/62091

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-07 06:00:21 +00:00
kmillikin@chromium.org
339e2e5244 Add two more invocations of ENTER_V8 to places where we need to write
to V8's heap.
Review URL: http://codereview.chromium.org/60089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 10:30:21 +00:00
kmillikin@chromium.org
2c5ce41876 Move some more ENTER_V8 invocations. The biggest one is to move the
one in v8::V8::Initialize to after the early bailout.
Review URL: http://codereview.chromium.org/60083

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 08:18:24 +00:00
kmillikin@chromium.org
35d6c8fb03 Remove ENTER_V8 from small API functions that do not need access to
V8's heap or only need read access.

This means that IsDeadCeck and EnsureInitialized could sometimes be
called without having already entered the VM.  To simplify things,
this is made always the case.  A couple of error callbacks do not need
to leave V8 because they haven't entered.

Consistently enter V8 after LOG_API (since LOG_API is sometimes before
EnsureInitialized or IsDeadCheck).

This all should have no effect unless V8 is built with
ENABLE_HEAP_PROTECTION and run with --protect-heap.

Review URL: http://codereview.chromium.org/56211

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 07:49:20 +00:00
ager@chromium.org
9bc64e657a Prepare another push to trunk (version 1.1.6). We pushed an unsafe
compiler optimization which has now been reverted.
Review URL: http://codereview.chromium.org/60011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-01 10:41:37 +00:00
ager@chromium.org
185aa082c4 Prepare to push version 1.1.5 to trunk. This version contains a
number of bug fixes.
Review URL: http://codereview.chromium.org/60004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-01 06:39:18 +00:00
kmillikin@chromium.org
87d8bcf7ee Mark a bunch of places where we enter or leave V8 through the API.
Indiscriminately mark every place with EnsureInitialized, ON_BAILOUT,
or IsDeadCheck (even if they cannot write to V8's heap).  Also mark
callbacks, and one other place (Function::SetName) hit in Chromium.
Review URL: http://codereview.chromium.org/57049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 09:07:57 +00:00
kmillikin@chromium.org
d3ee29a7f6 Add just enough state changes from EXTERNAL (outside V8) to OTHER
(generic state inside V8) in the API to allow the V8 shell to run all
the mjsunit tests with heap protection on.

These state changes are only taken when built with
ENABLE_HEAP_PROTECTION.  The two states OTHER and EXTERNAL are treated
the same because we will not properly reenter OTHER through the API.
Review URL: http://codereview.chromium.org/56060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 13:32:28 +00:00
ager@chromium.org
ab845fd829 Prepare to push version 1.1.4 to trunk.
Review URL: http://codereview.chromium.org/56059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 12:58:45 +00:00
sgjesse@chromium.org
8b7a288e48 Debugger message handler can be called from V8 thread.
The message handler function set through the debugger API is normally called in a different thread than the V8 thread where execution is stopped due to debugger event. This change adds an option to the API for specifying that the message handler should be called directly from the V8 thread. For an application like Chrome where thread dispatching is already in place this makes more sense.

Add an option to the message handler debugger API to process messages in the thread where V8 is running instead of posting it to a queue for processing on a additional thread.
Review URL: http://codereview.chromium.org/42643

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 09:56:53 +00:00
christian.plesner.hansen@gmail.com
9142c42df2 Fixed a bunch of memory leaks in tests, including:
- String traversal test data (now in a zone)
 - Debug message thread (now joined on exit)
 - Threading test threads (now joined on exit)
 - Changed message tests framework to cope with valgrind
Also, fixed a bug where we'd try to delete stack-allocated objects
when tearing down v8.  Good times.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 00:24:49 +00:00
kasperl@chromium.org
898297b0b7 Preparing push of version 1.1.3 to trunk.
Review URL: http://codereview.chromium.org/53012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 14:42:35 +00:00
ager@chromium.org
efba01b86f Preparing push of version 1.1.2 to trunk.
Review URL: http://codereview.chromium.org/42556

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 11:07:09 +00:00
sgjesse@chromium.org
d8e53cf150 Extend debugger agent protocol with a connect message.Added a name of the embedding application when enabeling the debugger agent.Send a connection message from the debugger agent to the remote debugger when connecting. This message contains the V8 version, the protcol version (currently 1) and the name of the embedding application. Currently this information is just printed raw as received.
Review URL: http://codereview.chromium.org/52012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 22:23:39 +00:00
iposva@chromium.org
7b50c072f9 Add a new C++ pointer wrapping API to External to not dilute the
External::Cast.

Review URL: http://codereview.chromium.org/52021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 19:51:10 +00:00
iposva@chromium.org
1db91bee34 - Do not allocate proxy objects if the pointer can be wrapped in a Smi representation.
Review URL: http://codereview.chromium.org/42466

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 22:13:50 +00:00
mike@belshe.com
318c9eed21 Add a public API for using an empty sring.
v8::String::Empty()


Review URL: http://codereview.chromium.org/42423

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 23:35:09 +00:00
iposva@chromium.org
ea653021fc - Allow hidden properties to be set on any JSObject through the V8 C++ API.
- Use the hidden properties to expose a IdentityHash accessor.

Review URL: http://codereview.chromium.org/50016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 18:50:00 +00:00
mike@belshe.com
c5d777338a Expose Cloning through API.
Review URL: http://codereview.chromium.org/42339

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 19:24:15 +00:00
erik.corry@gmail.com
608a99a90c Remove all uses of StringShape variables, since that has proven
to be error-prone and of little benefit in terms of performance.
Review URL: http://codereview.chromium.org/45010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 09:33:06 +00:00
davemoore@chromium.org
46f753a184 - Added ability to call histograms from within v8
- Changed the StatsRates to use the new HistogramTimers

Review URL: http://codereview.chromium.org/42020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 16:06:31 +00:00
ager@chromium.org
a4d60dd463 Prepare to push V8 version 1.1.1 to trunk.
Review URL: http://codereview.chromium.org/42122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 14:10:44 +00:00
kasperl@chromium.org
765a3804a9 Prepare push to trunk. Now working on version 1.1.1.
Review URL: http://codereview.chromium.org/43123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 07:11:15 +00:00
sgjesse@chromium.org
9d17b0d4c8 Whenever a script object is created it is assigned a unique id. Currently this id is assigned from an 32 bit integer counter.
Changed the script break points to be able to handle both break points based on script names and script ids. When break points are set through a script id the position is relative to the script itself. This is different from the script break points set through script names where the line/coulmn offset is taken into account.

This has the side effect that function break points are not converted into script break points for named scripts.

Show the script id in the D8 shell debugger when listing all scripts using the 'scripts' command.
Review URL: http://codereview.chromium.org/40317

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 08:10:50 +00:00
sgjesse@chromium.org
92aa4ab36c Add V8 debugger agent.
The debugger agent listens on a TCP/IP port for a remote debugger connection. When such a connection is established the debuger JSON protocol is communicated between the agent the the remote debugger. The messages containing the JSON protocol has a RFC-822 like header with a Content-Length field and with the body containing the JSON in UTF-8 encoding.

The D8 shell has option --debugger-agent to start the debugger agent.
Review URL: http://codereview.chromium.org/27355

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 12:23:45 +00:00
christian.plesner.hansen@gmail.com
a4d8eadc69 all-in-one
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-02 09:09:07 +00:00
kasperl@chromium.org
d77a0468cb Prepare push to trunk. Now working on version 1.0.4.
Review URL: http://codereview.chromium.org/31015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1387 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 11:55:57 +00:00
kasperl@chromium.org
c7c959632a Experimental (somewhat): Force GCs when disposing contexts, but
make sure not to do it repeatedly for bursts of context 
disposals.
Review URL: http://codereview.chromium.org/27201

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 12:40:50 +00:00
kasperl@chromium.org
1e42e70021 Use SSE3 instructions - if available - for faster To(U)Int32
conversion in bit operation stubs. Disable serialization
support by default to allow us to use SSE3 instructions and
faster write barrier code when running without snapshot.
Review URL: http://codereview.chromium.org/27046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 14:57:46 +00:00
ager@chromium.org
539a29cbd3 Prepare push to trunk. Now working on version 1.0.3.
Review URL: http://codereview.chromium.org/27129

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 12:46:23 +00:00
sgjesse@chromium.org
44b83d3e77 Add host callback for debug break.
Add the ability to have the host embedding V8 receive a callback in the V8 thread while V8 is processing a debug callback. When V8 is processing a debug callback the thread where V8 is executing is sitting in a tight loop processing debug commands until the continue command has been executed. In some embedding situations it is beneficial to be able to call back into the embedding host from the thread where V8 is sitting. The might have functions which needs to be called to complement the JavaScript debugging.

Using the uint16_t array to pass a void* is a temporary hack.
Review URL: http://codereview.chromium.org/20491

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 14:02:42 +00:00
sgjesse@chromium.org
ceef7cb854 Make the debugger completely unload when the debug event listener is unregistered.
Added a number of handle scopes to the debugger code to keep handles local to the function using them.

Fixed SetDebugEventListener to actually unregister when passed a NULL pointer. Previously this NULL pointer was wrapped in a Proxy.

BUG=1242702
Review URL: http://codereview.chromium.org/21347

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 12:36:58 +00:00
ager@chromium.org
be5767575b Prepare push to trunk containing two irregexp crash fixes and support
for morphing strings to external strings.  Now working on version
1.0.2.

Review URL: http://codereview.chromium.org/20351

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 10:03:06 +00:00
iposva@chromium.org
be6b490fb0 Remove experimental ExternalSymbolCallback feature. This is not needed
since we can now transform String objects to be external when needed.

Review URL: http://codereview.chromium.org/21285

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-12 16:58:55 +00:00
iposva@chromium.org
1bf2c7405e Allow the morphing of strings to external strings to avoid having to
create copies in the embedding code (aka WebKit V8 bindings) on every
external use.

Review URL: http://codereview.chromium.org/21117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-11 23:52:52 +00:00
iposva@chromium.org
4ce82a17d0 Prepare push to trunk. Now working on version 1.0.1.
Review URL: http://codereview.chromium.org/21194

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-10 00:31:58 +00:00
sgjesse@chromium.org
d131ecf3dd Changed the debugger API to allow only one debug event listener to be registered. The public API now only has SetDebugEventListener instead of AddDebugEventListener and RemoveDebugEventListener.
Moved the registrered debug event listener from the context to a global handle in the Debugger class. Storing it in the context did not make much sense.

Changed a lot of tests to handle the API change.

BUG=1242707
Review URL: http://codereview.chromium.org/19753

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 07:59:12 +00:00
mike@belshe.com
75037cbd6e Enable programmatic access to Profile pause/resume
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-29 19:47:00 +00:00
ager@chromium.org
92047bd3fa Prepare push to trunk. Now working on version 1.0.0.
Review URL: http://codereview.chromium.org/18843

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-27 09:44:41 +00:00
erik.corry@gmail.com
50e5ad72cb Fix bug where strings were not flattened before regexp.
Review URL: http://codereview.chromium.org/18552

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 08:35:41 +00:00
iposva@chromium.org
e718576d4f Split handle scopes into an internal version and a version accessible
through the API. This allows us to verify state on entry through the API.
In this change verification in the API entry is checking that the current
thread holds the V8 lock when a HandleScope is instantiated if a v8::Locker
has ever been used by the V8 instance.
Review URL: http://codereview.chromium.org/18707

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 17:22:23 +00:00
ager@chromium.org
49d9334955 Prepare push to trunk. Now working on version 0.4.9.
Review URL: http://codereview.chromium.org/18310

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-16 10:09:55 +00:00
deanm@chromium.org
b7c1200462 Fix a bunch of spelling mistakes :\
Review URL: http://codereview.chromium.org/18094


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 19:08:34 +00:00
christian.plesner.hansen@gmail.com
569fb985ce Added more constness to the api. There are still some methods back
that could be const but aren't, but now at least all the obvious ones
should be.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-08 11:35:34 +00:00
christian.plesner.hansen@gmail.com
0d22bce302 Update version number to fix small small whoopsie I committed when
pushing to trunk.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-06 14:53:10 +00:00