Skip to content

Commit b1734fd

Browse files
committed
cherry-pick(#36211): chore: prepare to language ports roll
1 parent 2e57a78 commit b1734fd

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

packages/playwright-core/src/client/network.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,7 @@ export class Route extends ChannelOwner<channels.RouteChannel> implements api.Ro
346346

347347
async fulfill(options: { response?: api.APIResponse, status?: number, headers?: Headers, contentType?: string, body?: string | Buffer, json?: any, path?: string } = {}) {
348348
await this._handleRoute(async () => {
349-
await this._wrapApiCall(async () => {
350-
await this._innerFulfill(options);
351-
}, { internal: true });
349+
await this._innerFulfill(options);
352350
});
353351
}
354352

packages/playwright-core/src/server/dispatchers/dispatcher.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { TargetClosedError, isTargetClosedError, serializeError } from '../error
2424
import { SdkObject } from '../instrumentation';
2525
import { isProtocolError } from '../protocolError';
2626
import { compressCallLog } from '../callLog';
27+
import { methodMetainfo } from '../../utils/isomorphic/protocolMetainfo';
2728

2829
import type { CallMetadata } from '../instrumentation';
2930
import type { PlaywrightDispatcher } from './playwrightDispatcher';
@@ -304,6 +305,12 @@ export class DispatcherConnection {
304305
return;
305306
}
306307

308+
if (methodMetainfo.get(dispatcher._type + '.' + method)?.internal) {
309+
// For non-js ports, it is easier to detect internal calls here rather
310+
// than generate protocol metainfo for each language.
311+
validMetadata.internal = true;
312+
}
313+
307314
const sdkObject = dispatcher._object instanceof SdkObject ? dispatcher._object : undefined;
308315
const callMetadata: CallMetadata = {
309316
id: `call@${id}`,

utils/generate_dotnet_channels.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ function properties(properties, indent, onlyOptional, parentName, level) {
136136
if (name === 'android' || name === 'electron')
137137
continue;
138138
if (name.startsWith('$mixin')) {
139-
visitProperties(mixins.get(value).properties, parentName + toTitleCase(name));
139+
visitProperties(mixins.get(value).properties, parentName);
140140
continue;
141141
}
142142
const inner = inlineType(value, indent, parentName + toTitleCase(name), level + 1);

0 commit comments

Comments
 (0)