Commit Graph

1103 Commits

Author SHA1 Message Date
John McCutchan 8a7f7715f1 Add a complex reload test that rebases the root script path three times.
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/2518643002 .
2016-11-18 12:24:01 -08:00
Ryan Macnak 6183316355 Don't crash attempting to JSON print an uninitialized Map.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2503423003 .
2016-11-16 11:14:43 -08:00
Ryan Macnak d4b5793307 Enable service tests for app snapshots.
Issue #27806

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2496993002 .
2016-11-15 16:12:59 -08:00
Kevin Moore 4e17c8b1f8 Observatory: remove unused imports
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2505673002 .
2016-11-15 15:11:43 -08:00
Jens Johansen e9c78330f2 Test showing crash when stepping through new Map creation.
Stepping through the following small program:

main() {
  var map = {};
}

will crash the vm if it is compiled in debug mode because
the debugging tries to call .Length() on an uninitialized Map.

Crash:

runtime/vm/object.h: 6545: error: expected: (value & kSmiTagMask) == kSmiTag
Dumping native stack trace for thread d12f
  [0x0000000000a66c36] dart::Profiler::DumpStackTrace(bool)
  [0x0000000000a66c36] dart::Profiler::DumpStackTrace(bool)
  [0x0000000000765548] dart::DynamicAssertionHelper::Fail(char const*, ...)
  [0x000000000074b78b] dart::Smi::ValueFromRaw(unsigned long)
  [0x000000000074b6ad] dart::Smi::Value(dart::RawSmi const*)
  [0x00000000009b92cc] dart::LinkedHashMap::Length() const
  [0x00000000009e2351] dart::LinkedHashMap::PrintJSONImpl(dart::JSONStream*, bool) const

[...]

Filed as bug https://github.com/dart-lang/sdk/issues/27790.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/2486213002 .
2016-11-15 12:49:44 +01:00
Sigmund Cherem 2c17d62617 Update .status files to make bots green again
Review URL: https://codereview.chromium.org/2497863003 .
2016-11-14 08:48:52 -08:00
Siva Annamalai b2f3bb6711 Add following tests :
- enable the service protocol web server when it is already enabled
 - disable the service protocol web server when it is already disabled
 - disable the service protocol web server when it is enabled
 - validate field in the ServiceProviderInfo object
 - try connecting to the web server without the auth token when use of
   an auth token is enabled
 - try connecting to the web server with  the auth token when use of
   an auth token is enabled
 - try connecting to the web server without the auth token when use of
   an auth token is not enabled

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2500543002 .
2016-11-11 12:42:25 -08:00
Florian Schneider d53f26e395 Remove references to non-existing tests from status files.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2481223003 .
2016-11-08 09:21:21 -08:00
John McCutchan 14297ee480 Add an environment variable toggle to control new service protocol auth token
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2486443002 .
2016-11-07 14:45:52 -08:00
Ryan Macnak 3658a16e47 DBC: When calling DRT_OptimizeInvokedFunction, patch the stack to have a stub instead of the to-be-optimized function as the caller.
Fixes #27746

R=fschneider@google.com, zra@google.com

Review URL: https://codereview.chromium.org/2473213002 .
2016-11-04 09:51:02 -07:00
Florian Schneider de6b131857 Temporarily skip flaky tests for DBC
BUG=#27746

Review URL: https://codereview.chromium.org/2477753002 .
2016-11-03 15:08:42 +01:00
Terry Lucas 8b3e68ac8a Skip test that fails in Dartium
TBR=johnmccutchan@google.com,rmacnak@google.com

Review URL: https://codereview.chromium.org/2462403002 .
2016-11-01 06:03:28 -07:00
John McCutchan 599ed1389d More analyzer bot fixes
BUG=

Review URL: https://codereview.chromium.org/2466033003 .
2016-10-31 13:36:23 -07:00
John McCutchan 63e4f69e5e Provide an API to dart:developer to control the web server hosting the Service Protocol
- [x] Add `ServiceProtocolnfo` class to dart:developer.
- [x] Add `Service` class to dart:developer.
- [x] Add `Service.getInfo` static method to dart:developer.
- [x] Add `Service.controlWebServer` static method to dart:developer.

API:

```dart

/// Information about the service protocol.
class ServiceProtocolInfo {
  /// The major version of the protocol.
  final int majorVersion;
  /// The minor version of the protocol.
  final int minorVersion;
  /// The Uri to access the service. If the web server is not running, this
  /// will be null.
  final Uri serverUri;
}

/// Access information about the service protocol and control the web server.
class Service {
  /// Get information about the service protocol.
  static Future<ServiceProtocolInfo> getInfo();

  /// Control the web server that the service protocol is accessed through.
  static Future<ServiceProtocolInfo> controlWebServer({bool enable: false});
}
```

... and add a randomly generated authentication token path prefix that must be passed in to access the service protocol.

Old base url:

Observatory listening on http://127.0.0.1:54804/

New base url:

Observatory listening on http://127.0.0.1:54804/<token>/

For example:

Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/

Many tools will need to be updated.

Fixes #23320

BUG=
R=asiva@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2438613002 .
2016-10-31 12:32:23 -07:00
John McCutchan 8061bd5a8a Add local variable declaration token position to service protocol
- [x] Add three public fields to the "BoundVariable" service type: declarationTokenPos, visibleStartTokenPos, and visibleEndTokenPos. (naming suggestions welcome!)
- [x] Extend LocalVarDescriptors to hold the declaration token position (it already had the scope visibility boundaries).
- [x] Extend ContextScope to hold the declaration token position.
- [x] Add a unit test which verifies this works for local variables, function parameters, and closure captured variables.

Fixes https://github.com/dart-lang/sdk/issues/25569

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2419013004 .
2016-10-17 11:18:24 -07:00
John McCutchan d483b0d2af Mark reload_sources_test as slow
BUG=

Review URL: https://codereview.chromium.org/2416013002 .
2016-10-13 11:02:36 -07:00
John McCutchan 2d0a08baf9 Make reloadSources service RPC public
- [x] Make `reloadSources` RPC public.
- [x] Add an optional 'pause' parameter to `reloadSources`. When set to true, the isolate will enter the debug pause loop immediately after reloading sources and before resuming execution. This makes it possible for debugger clients to set breakpoints before resuming.
- [x] Add reload_sources_test which tests pausing after reload.
- [x] Fix a bug in `GetVarDescriptors` where a null code object could be used.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/2411153002 .
2016-10-13 07:45:56 -07:00
William Hesse 25e3b30560 Update status for failing tests
BUG=https://github.com/dart-lang/sdk/issues/27557
R=floitsch@google.com

Review URL: https://codereview.chromium.org/2405843002 .
2016-10-10 16:26:55 +02:00
John McCutchan 8b37da82ef Support paths which are encoded with base64 in http put devfs server code
- [x] Add a new header 'dev_fs_path_b64' which is used over 'dev_fs_path' when present.
- [x] 'dev_fs_path_b64' expects the path encoded as UTF8 and then BASE64.
- [x] Add unit test case.

BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/2386123005 .
2016-10-04 15:31:09 -07:00
Matthias Hausner 1a802d3517 Fix random test failures for issue_27238_test
BUG=27238
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2378923006 .
2016-09-30 11:14:03 -07:00
John McCutchan 1b5533fe8f Use a larger sleep time in get_allocation_profile_rpc_test so that the test doesn't flake on Windows
Fixes #27444

BUG=
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2378813002 .
2016-09-28 12:45:02 -07:00
Siva Annamalai e8a9a06528 Fix status file for debugger_location_test.
BUG=

Review URL: https://codereview.chromium.org/2371283002 .
2016-09-27 15:51:58 -07:00
John McCutchan 2ed4f4725a Status file tweak
BUG=

Review URL: https://codereview.chromium.org/2377743002 .
2016-09-27 13:02:39 -07:00
John McCutchan 52f9fac257 Split debugger_location_test into two separate tests
Fixes #27434

R=asiva@google.com

Review URL: https://codereview.chromium.org/2376433003 .
2016-09-27 10:59:46 -07:00
Siva Annamalai ce596133ad Skip service/debugger_location_test see Issue 27434.
BUG=

Review URL: https://codereview.chromium.org/2370193002 .
2016-09-26 21:15:45 -07:00
John McCutchan 48c6f19600 Respect setLibraryDebuggable
- [x] Mark all libraries debuggable by default
- [x] Mark all dart:_* libraries as not debuggable by default
- [x] Respect setLibraryDebuggable
- [x] Add set library debuggable test case
- [x] Do not allow dart:_* libraries to be marked debuggable

Fixes https://github.com/dart-lang/sdk/issues/27370

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2361183002 .
2016-09-23 10:45:51 -07:00
Matthias Hausner 74e779d4fe Fix stepping over await statements
When async-stepping over an await statement that follows a previous
async-step command, ensure that the synthetic breakpoint at the
beginning of the async closure is not accidentally deleted.

Removing a test that depends on minute details of the internal
implementation of async-step commands.

Adding new test that checks for multiple consecutive async-step
commands.

Note that debugger.cc seems to contain a memory leak. Breakpoint
objects are not deleted (deallocated) when RemoveBreakpoint()
is called. Will address this in a separate CL.

BUG=#27238
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2366463002 .
2016-09-22 14:06:24 -07:00
William Hesse 92cd3e10f5 Fix test.py and tests to use an explicit --packages flag.
BUG=https://github.com/dart-lang/sdk/issues/27412
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2361813003 .
2016-09-22 17:51:09 +02:00
Matthias Hausner 0dd760092d Add debugger safe point on assignment to global variables
Just like we do for local variables, add a debug step check (and
thus a breakpoint location) to global variable assignment if
the right side of the assignment has no possible breakpoint locations.

BUG=#27287
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2354773002 .
2016-09-20 14:05:45 -07:00
William Hesse 80572c4038 Update status for browser tests
BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/2358583002 .
2016-09-20 16:36:01 +02:00
John McCutchan 699e328105 Fix VM connect element test
BUG=

Review URL: https://codereview.chromium.org/2348313002 .
2016-09-19 07:33:44 -07:00
John McCutchan d5f138e459 Fix async_generator_breakpoint_test so it awaits on isolate resume requests
BUG=

Review URL: https://codereview.chromium.org/2344253002 .
2016-09-16 11:24:53 -07:00
John McCutchan e2b922b4c5 Fix service test websocket error edge case
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2343183002 .
2016-09-16 10:31:05 -07:00
John McCutchan 0d831bd5c8 Use Chain.capture instead of runZoned
- [x] Swap all calls of runZoned to Chain.capture.

Chain.capture is a wrapper around runZoned that tracks stack traces across asynchronous gaps.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2349753002 .
2016-09-16 09:44:06 -07:00
Carlo Bernaschina 5177c2bca9 Removed polymer & mirror from Observatory
web_components are still necessary, but avoiding to use shadow dom
allows us to use the lite version

Closes=https://github.com/dart-lang/sdk/issues/27239
Closes=https://github.com/dart-lang/sdk/issues/27148
Closes=https://github.com/dart-lang/sdk/issues/26952

R=johnmccutchan@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2310003004 .
2016-09-07 14:15:27 -07:00
Carlo Bernaschina 2eab4de315 Converted Observatory logging-page element
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2299893003 .
2016-09-02 10:27:48 -07:00
Siva Annamalai 63f1261064 Update status file for issue 27225.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2301263002 .
2016-09-01 15:57:39 -07:00
Carlo Bernaschina 741d99f100 Converted Observatory code-view element
Not fully testable

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2306483002 .
2016-09-01 13:56:45 -07:00
Carlo Bernaschina 90c50c52f2 Converted Observatory vm-view && isolate-view elements
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2304463002 .
2016-09-01 10:46:36 -07:00
William Hesse 7bceafd11e Update all packages in third_party/pkg to latest compatible version
Packages markdown and stack_trace are not updated, because of their high impact.
They will be updated in separate CLs.

BUG=
R=nweiz@google.com, rnystrom@google.com

Review URL: https://codereview.chromium.org/2297213002 .
2016-09-01 10:12:23 +02:00
Carlo Bernaschina 1341e94321 Converted Observatory class-view element
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2294073003 .
2016-08-31 17:03:38 -07:00
Todd Turnidge cd8292d175 Don't return negative token positions in stack traces.
Closes #27128

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2294883004 .
2016-08-31 16:22:18 -07:00
Carlo Bernaschina 8561986221 Removed warnings from service tests
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2296043002 .
2016-08-30 17:01:05 -07:00
Ryan Macnak c80b23b7ff Fix evaluating in async/sync*/async* methods.
Fixes #27167.

R=hausner@google.com

Review URL: https://codereview.chromium.org/2291293003 .
2016-08-30 15:16:57 -07:00
Carlo Bernaschina bf7d220741 Converted Observatory instance-view element
R=turnidge@google.com

Review URL: https://codereview.chromium.org/2291233002 .
2016-08-30 14:53:24 -07:00
Carlo Bernaschina 19e9627ea0 Converted Observatory library-view element
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2289953003 .
2016-08-30 13:58:15 -07:00
Carlo Bernaschina b63546ac57 Converted Observatory function-view element
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2291823002 .
2016-08-29 16:39:38 -07:00
Carlo Bernaschina a326a56eb1 Converted Observatory object-pool-view element
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2283863003 .
2016-08-29 11:14:18 -07:00
Carlo Bernaschina 8e7725a8b4 Converted Observatory field-view element
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2287793002 .
2016-08-29 10:47:05 -07:00
Sigmund Cherem f6680d13a2 One more round of status file updates to get the bots green.
TBR=sra@google.com

Review URL: https://codereview.chromium.org/2285213003 .
2016-08-29 08:14:33 -07:00