Mark new wasm extension APIs as optional for the migration path
Bug: 1299832, 1342848
Change-Id: I07f7311ca68b4a8a2ae8e12aef3daaecd396f535
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3751212
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
diff --git a/extension-api/ExtensionAPI.d.ts b/extension-api/ExtensionAPI.d.ts
index 54c383c..ff60874 100644
--- a/extension-api/ExtensionAPI.d.ts
+++ b/extension-api/ExtensionAPI.d.ts
@@ -229,8 +229,9 @@
removeRawModule(rawModuleId: string): Promise<void>;
/**
- * Return type information for an expression. The result describes the type (and recursively its member types) of the
- * result of the expression if it were evaluated in the given context.
+ * DEPRECATED. Return type information for an expression. The result describes the type (and recursively its
+ * member types) of the result of the expression if it were evaluated in the given context.
+ * TODO(crbug.com/1342848) Remove.
*/
getTypeInfo(expression: string, context: RawLocation): Promise<{
typeInfos: Array<TypeInfo>,
@@ -238,7 +239,9 @@
}|null>;
/**
- * Returns a piece of JavaScript code that, if evaluated, produces a representation of the given expression or field.
+ * DEPRECATED. Returns a piece of JavaScript code that, if evaluated, produces a representation of the given
+ * expression or field.
+ * TODO(crbug.com/1342848) Remove.
*/
getFormatter(
expressionOrField: string|{
@@ -250,12 +253,16 @@
}|null>;
/**
- * Evaluate a source language expression in the context of a given raw location and a given stopId. stopId is an opaque key that should be passed to the APIs accessing wasm state, e.g., getWasmLinearMemory. A stopId is invalidated once the debugger resumes.
+ * Evaluate a source language expression in the context of a given raw location and a given stopId. stopId is an
+ * opaque key that should be passed to the APIs accessing wasm state, e.g., getWasmLinearMemory. A stopId is
+ * invalidated once the debugger resumes.
+ * TODO(crbug.com/1342848) Make non-optional.
*/
- evaluate(expression: string, context: RawLocation, stopId: unknown): Promise<RemoteObject|null>;
+ evaluate?(expression: string, context: RawLocation, stopId: unknown): Promise<RemoteObject|null>;
/**
- * Returns a piece of JavaScript code that, if evaluated, produces the address of the given field in the wasm memory.
+ * DEPRECATED. Returns a piece of JavaScript code that, if evaluated, produces the address of the given field in the wasm memory.
+ * TODO(crbug.com/1342848) Remove.
*/
getInspectableAddress(field: {
base: EvalBase,
@@ -290,12 +297,14 @@
/**
* Retrieve properties of the remote object identified by the object id.
+ * TODO(crbug.com/1342848) Make non-optional.
*/
- getProperties(objectId: RemoteObjectId): Promise<PropertyDescriptor[]>;
+ getProperties?(objectId: RemoteObjectId): Promise<PropertyDescriptor[]>;
/**
* Permanently release the remote object identified by the object id.
+ * TODO(crbug.com/1342848) Make non-optional.
*/
- releaseObject(objectId: RemoteObjectId): Promise<void>;
+ releaseObject?(objectId: RemoteObjectId): Promise<void>;
}