aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/debugger/qv8debugservice.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-294/+0
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Debugger: Consistenly use 'state' instead of 'status'Kai Koehne2012-02-101-3/+3
| | | | | | | | | Fix inconsistent naming e.g. in QtDeclarativeEngineDebug by always using 'state' instead of 'status'. This is in line with the other source code, which also seems to favor 'state'. Change-Id: I65a7a3bd0eb7dfffeb37b5f8dad15b0a4a78de70 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* DeclarativeDebug: Add version info to service pluginsAurindam Jana2011-12-161-10/+2
| | | | | | | | Send the version info of each plugin alongwith the plugin names to client. Change-Id: I223689b32cdc5b0c48a4f508330033352b427937 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* QV8DebugService: add version commandAurindam Jana2011-12-151-31/+32
| | | | | | | Version command to retrieve debugger version info. Change-Id: I711e2a3d639c648cef50498fe5bbb9b6b8c6c1fe Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* QV8DebugService: Add breakaftercompileAurindam Jana2011-12-141-6/+19
| | | | | | | | Add breakaftercompile command that will set the v8::DebugBreak() whenever a new script is compiled. Change-Id: Id9027066826b6de621058d3170fa628463ef0152 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* QV8DebugService: Simplify the service codeAurindam Jana2011-12-141-363/+95
| | | | | | | | | Removed all parsing functionality. The service only acts as a delegate to v8 debugger. Apart from that, it calls the v8 debug static APIs when requested by client. Change-Id: I2917c2d080e5b409a4b5f39d386279c33634cade Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Debugger: Fix compilation error with msvcKai Koehne2011-11-281-2/+1
| | | | | | | | | MSVC "cannot allocate an array of constant size 0". The argument isnt accessed anyway, so we can just pass 0 instead. Change-Id: I3d65707148f045f2ed2779604c164297830bfe87 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* DeclarativeDebugServices: Cleanup CodeAurindam Jana2011-11-251-19/+5
| | | | | | | | Removed addEngine and removeEngine methods from services that do not use the functions of QDeclarativeEngine. Change-Id: Id2ddcbe8cf5706d1e4ca4b59011c7e3574cfdba8 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* V8DebugService: Optimize Code.Aurindam Jana2011-11-251-263/+263
| | | | | | | Replace usage of QJSEngine with V8 APIs. Change-Id: I5221d11c1fb96a4912063d452af437a7f5bdb471 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Debugger: Don't register v8 callback until client is attachedKai Koehne2011-11-231-46/+146
| | | | | | | | | | Registering the v8 debugger callback reportedly slows down performance. Do this only if a client is really attached. When attaching, request the already compiled scripts to make sure breakpoint urls are properly adapted. Change-Id: I9ff24b7ca53e13da06f70a9e5860bbd4b9aa0d99 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Debugger: Make registration of services explicitKai Koehne2011-11-231-1/+1
| | | | | | | | | | Services now have to call registerService() themselves in the constructor. This fixes a race condition where the empty implementation of messageReceived() was called instead of the one in the subclass because the object wasn't fully constructed yet. Change-Id: I590ec8b76e906bdb6b5cdcb18680938edde283ee Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Debugger: Move server into it's own threadKai Koehne2011-11-221-61/+74
| | | | | | | | | | | | | | So far the debugger infrastructure was running in the GUI thread, which required e.g. nested event loops to implement blocking behavior. The server and networking code are now running in their own thread, while the services are still running in the main thread. Because v8 isn't thread safe, we're adding two new JSEngines + isolates to qv8debugservice: One to decode JSON messages in the debugger thread, and one in the GUI thread. Change-Id: I746f5e203968f7bcc510fb66118c88ef0fd0cd14 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* QV8DebugService: Return JSON messages for internal requests.Aurindam Jana2011-11-071-0/+56
| | | | | | | | | Internal requests are not handles by V8. Hence, create a JSON message similar to v8 debugging protocol and send it to client. This is only for uniformity wrt to debug requests. Change-Id: Ia0a3cda0ef157b852fb4402fde62b4651a95bd56 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* QV8DebugService: Cancel DebugBreak Requests before disconnectAurindam Jana2011-11-041-0/+3
| | | | | Change-Id: Iaf00123e0c9aa2e5542e9c8863df3887092ac953 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Force V8 debugger load on startup instead of on demand.Glenn Watson2011-11-011-0/+7
| | | | | | | | | | | | | | The V8 debugger code can take several hundred milliseconds to start. This is by default loaded and unloaded on demand, for example whenever a script is compiled. This has a significant effect on the timing reported by the QML profiler in Qt Creator. This change forces the debugger context to be loaded when the v8 context is created, so that this cost is paid once on startup and no longer affects the QML profiling times. Task-number: QTBUG-22170 Change-Id: I5533b53908b3c53e18b0eb870ed6166d109429df Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* QV8DebugService: QML Signal HandlingAurindam Jana2011-10-241-8/+38
| | | | | | | | Store state of breakpoints of type "Break on QML Signal Handler" so that such breakpoints can be edited (enabled/disabled). Change-Id: Ic69bcd18b5e527af68190e7f18371ebb5e9e83fe Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Clean up declarative includesKent Hansen2011-10-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This commit is in preparation of moving several files to a separate library (QtQuick2).) Don't add all subfolders to the includepath (from the .pri files). There's no good reason to do that. For headers (both public and private) that are in the same folder as the file that includes them, prefer to use #include "foo.h" #include "bar_p.h" For public headers that are outside the current folder but have "unambiguous" names (e.g. qdeclarative prefix), use #include <foo.h> For private headers that are outside the current folder, use #include <private/baz_p.h> Also change #include <QtDeclarative/private/foo_p.h> to #include <private/foo_p.h> The header filenames already have a qdeclarative or qsg prefix; there's no need to prefix by module name to disambiguate. Finally, #include "private/foo_p.h" should be avoided. private/ is used for auto-generated (forwarding) headers, which never reside in the current (source) directory. Use angle brackets instead. Change-Id: I04f8477fdba043546064ee276475c09dc373f8f2 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* V8Debugger: Code beautificationKai Koehne2011-10-051-33/+34
| | | | | | | | | | Convert to from QString to QByteArray only when necessary. Also move private methods into private class. Change-Id: Iac28990f16c588e0172356c9395b7771f01f4817 Reviewed-on: http://codereview.qt-project.org/6022 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* JSDebugging: Enable break on events.Aurindam Jana2011-09-171-12/+96
| | | | | | | | | | | | The user can request Javascript break on event. The user can provide this info in the Breakpoints Window and provide the slot which will be called when the event occurs. For example: specify "onTriggered" if you need to break on Timer triggerred event. Change-Id: I09f869a5301a9c1f92a8b8c0f3df7f74b1027b4b Reviewed-on: http://codereview.qt-project.org/4751 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* JSDebugging: Send messages for events BeforeCompile to Client.Aurindam Jana2011-09-081-2/+5
| | | | | | | Change-Id: Ia4f2a290f94cc406c64a69e443521403b94db493 Reviewed-on: http://codereview.qt-project.org/4348 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Debug Service: Synchronize with v8 debug client.Aurindam Jana2011-08-241-15/+60
| | | | | | | | | | In "blocking" mode, the service waits till the client has sent all initialization data. Change-Id: Ia62ac46527911bc9c648abd6930cb6ea1474718b Reviewed-on: http://codereview.qt.nokia.com/3306 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* v8 debugging: delay setting of breakpoints till afterCompileAurindam Jana2011-08-191-7/+27
| | | | | | | | The setting of breakpoints is delayed till the complete filepath of the script is determined. Change-Id: I8875eea3cecf5093c5d43741e26222e03123af84 Reviewed-on: http://codereview.qt.nokia.com/3169 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Enable v8 debuggingAurindam Jana2011-08-171-0/+209
Javascript v8 debugging service replaces the QScript debugging service. Change-Id: I25eea00eed3959b84a8f412e4c3484296d62e27b Reviewed-on: http://codereview.qt.nokia.com/2614 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>