Change v8debugAPI clear to async.#327
Conversation
src/agent/v8debugapi.ts
Outdated
| 'A script matching the source file was not found loaded on the debuggee', | ||
| SOURCE_FILE_AMBIGUOUS: 'Multiple files match the path specified', | ||
| V8_BREAKPOINT_ERROR: 'Unable to set breakpoint in v8', | ||
| V8_BREAKPOINT_CLAER_ERROR: 'Unable to clear breakpoint in v8', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/agent/debuglet.ts
Outdated
| delete this.activeBreakpointMap_[breakpoint.id as string]; | ||
| if (this.v8debug_) { | ||
| this.v8debug_.clear(breakpoint); | ||
| this.v8debug_.clear(breakpoint, function(err) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| assert.ifError(err); | ||
| api.clear(bp); | ||
| done(); | ||
| api.clear(bp, function(err) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| assert.ifError(err); | ||
| api.clear(bp); | ||
| done(); | ||
| api.clear(bp, function(err) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
test/test-v8debugapi.ts
Outdated
| 'Locals and arguments are only displayed.*config.capture.maxExpandFrames=0' | ||
| )); | ||
| api.clear(bp); | ||
| config.capture.maxExpandFrames = oldCount; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
test/test-v8debugapi.ts
Outdated
| assert.equal(topFrame.locals[0].name, 'n'); | ||
| assert.equal(topFrame.locals[0].value, '2'); | ||
| api.clear(bp); | ||
| config.capture.maxFrames = oldMax; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
test/test-v8debugapi.ts
Outdated
| assert(((fooVal as any).status as any).isError); | ||
|
|
||
| api.clear(bp); | ||
| config.capture.maxDataSize = oldMaxData; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| // tslint:disable-next-line:variable-name | ||
| const ScopeType = vm.runInDebugContext('ScopeType'); | ||
| const assert = debugAssert(process.env.CLOUD_DEBUG_ASSERTIONS); | ||
| const assert = debugAssert(!!process.env.CLOUD_DEBUG_ASSERTIONS); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/agent/v8debugapi.ts
Outdated
| 'A script matching the source file was not found loaded on the debuggee', | ||
| SOURCE_FILE_AMBIGUOUS: 'Multiple files match the path specified', | ||
| V8_BREAKPOINT_ERROR: 'Unable to set breakpoint in v8', | ||
| V8_BREAKPOINT_CLAER_ERROR: 'Unable to clear breakpoint in v8', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
test/test-debuglet.ts
Outdated
|
|
||
| describe('setup', function() { | ||
| before(function() { oldGP = process.env.GCLOUD_PROJECT; }); | ||
| before(function() { oldGP = String(process.env.GCLOUD_PROJECT); }); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| it('should respect GCLOUD_DEBUG_LOGLEVEL', function(done) { | ||
| process.env.GCLOUD_PROJECT = '11020304f2934'; | ||
| process.env.GCLOUD_DEBUG_LOGLEVEL = 3; | ||
| process.env.GCLOUD_DEBUG_LOGLEVEL = '3'; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
matthewloring
left a comment
There was a problem hiding this comment.
No need to change this PR but in general we do not include punctuation in commit titles.
| v8.setListener(null); | ||
| } | ||
| return true; | ||
| return setImmediate(function() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
test/test-debuglet.ts
Outdated
|
|
||
| describe('setup', function() { | ||
| before(function() { oldGP = process.env.GCLOUD_PROJECT; }); | ||
| before(function() { oldGP = String(process.env.GCLOUD_PROJECT); }); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This PR aims to change the exisiting v8debug API clear function to async in order to prepare for the migration debug api from v8 to inspector, as inspector api is async.
0d81928 to
38568c1
Compare
This PR aims to change the exisiting v8debug API clear function to async
in order to prepare for the migration debug api from v8 to inspector,
as inspector api is async.