rpcProtocol.ts ×7

Frontier kind: Code frontier

unlabeled · c_26420e19af9b

3 tests · 8374 LOC · 37 files · introduces 0 tests · 31 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges31 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1350 ranges8374 lines · 37 files · Browse complete extent
All tests (intent)
3 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 31 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/services/extensions/common/rpcProtocol.ts 22 introduced LOC · 7 ranges

Open complete file

388 this._protocol.send(msg);
389 }, (err) => {
390 > delete this._cancelInvokedHandlers[callId]; rpcProtocol.ts
391 > const msg = MessageIO.serializeReplyErr(req, err);
392 > this._logger?.logOutgoing(msg.byteLength, req, RequestInitiator.OtherSide, `replyErr:`, err);
393 > this._protocol.send(msg);
394 });
395 }
415
416 private _receiveReplyErr(msgLength: number, req: number, value: any): void {
417 > this._logger?.logIncoming(msgLength, req, RequestInitiator.LocalSide, `receiveReplyErr:`, value); rpcProtocol.ts
418 >
419 > const callId = String(req);
420 > if (!this._pendingRPCReplies.hasOwnProperty(callId)) {
421 return;
422 }
424 > const pendingReply = this._pendingRPCReplies[callId];
425 > delete this._pendingRPCReplies[callId];
426 >
427 > let err: any = undefined;
428 > if (value) {
429 if (value.$isError) {
430 err = new Error();
436 }
437 }
438 > pendingReply.resolveErr(err); rpcProtocol.ts
439 > }
440
441 private _invokeHandler(rpcId: number, methodName: string, args: any[]): Promise<any> {
509
510 public resolveErr(err: any): void {
511 > this._promise.resolveErr(err); rpcProtocol.ts
512 > this._disposable.dispose();
513 > }
514 }
515
914
915 public static serializeReplyErr(req: number, err: any): VSBuffer {
916 > const errStr: string | undefined = (err ? safeStringify(errors.transformErrorForSerialization(err), null) : undefined); rpcProtocol.ts
917 > if (typeof errStr !== 'string') {
918 return this._serializeReplyErrEmpty(req);
919 }
926 result.writeLongString(errBuff);
927 return result.buffer;
928 > } rpcProtocol.ts
929
930 public static deserializeReplyErrError(buff: MessageBuffer): Error {
src/vs/workbench/services/extensions/common/lazyPromise.ts 9 introduced LOC · 3 ranges

Open complete file

64
65 public resolveErr(err: any): void {
66 > if (this._hasValue || this._hasErr) { lazyPromise.ts
67 return;
68 }
70 > this._hasErr = true;
71 > this._err = err;
72 >
73 > if (this._actual) {
74 > this._actualErr!(err);
75 > } else {
76 // If nobody's listening at this point, it is safe to assume they never will,
77 // since resolving this promise is always "async"
78 onUnexpectedError(err);
79 }
81
82 public then(success: any, error: any): any {