[WebExtensions] Deprecate runtime.PlatformInfo.nacl_arch#43799
[WebExtensions] Deprecate runtime.PlatformInfo.nacl_arch#43799
Conversation
|
Preview URLs (3 pages)
(comment last updated: 2026-04-19 16:52:08) |
rebloor
left a comment
There was a problem hiding this comment.
@bershanskiy some type of fixes and other suggestions for your consideration
| Values of this type are strings. Possible values are: `"arm"`, `"x86-32"`, `"x86-64"`. | ||
| {{Deprecated_Header}}{{non-standard_header}} | ||
|
|
||
| The enumerated value representing CPU instruction set architecture of Google Native Client used by the browser. This enum is deprecated, following removal of Google Native Client from Google Chrome. As of 2026, Chromium intends to remove this enum. Consider migrating to `PlatformArch` also available in {{WebExtAPIRef("runtime.PlatformInfo")}} via {{WebExtAPIRef("runtime.getPlatformInfo()")}}. |
There was a problem hiding this comment.
| The enumerated value representing CPU instruction set architecture of Google Native Client used by the browser. This enum is deprecated, following removal of Google Native Client from Google Chrome. As of 2026, Chromium intends to remove this enum. Consider migrating to `PlatformArch` also available in {{WebExtAPIRef("runtime.PlatformInfo")}} via {{WebExtAPIRef("runtime.getPlatformInfo()")}}. | |
| The enumerated value representing the CPU instruction set architecture of Google Native Client used by the browser. This enum is deprecated, following the removal of Google Native Client from Google Chrome. As of 2026, Chromium intends to remove this enum. Consider migrating to {{WebExtAPIRef("runtime.PlatformArch")}} in {{WebExtAPIRef("runtime.PlatformInfo")}} which you obtain using {{WebExtAPIRef("runtime.getPlatformInfo()")}}. |
There was a problem hiding this comment.
Both PlatformArch and PlatformNaclArch are available via the same API runtime.getPlatformInfo(), but the edit appears to suggest otherwise:
Consider migrating to {{WebExtAPIRef("runtime.PlatformArch")}} in {{WebExtAPIRef("runtime.PlatformInfo")}} which you obtain using {{WebExtAPIRef("runtime.getPlatformInfo()")}}.
| - `ARM` | ||
| - : The string literal `"arm"`. Represents all versions of ARM ISA, including all 32-bit and 64-bit variants. Equivalent to `PlatformArch.ARM` (32-bit variant) and `PlatformArch.ARM64` combined into one value. | ||
| - `X86_32` | ||
| - : The string literal `"x86-32"`. Represents 32-bit variant of the x86 arhitecture. Equivalent to `PlatformArch.X86_32`. | ||
| - `X86_64` | ||
| - : The string literal `"x86-64"`. Represents 64-bit-compatiable variant of the x86 arhitecture. Equivalent to `PlatformArch.X86_64`. | ||
| - `MIPS` | ||
| - : The string literal `"mips"`. Represents 32-bit variant of MIPS ISA, which was never officially supported by official releases. Equivalent to `PlatformArch.MIPS`. | ||
| - `MIPS64` | ||
| - : The string literal `"mips64"`. Represents 64-bit variant of MIPS ISA, which was never officially supported by official releases. Equivalent to `PlatformArch.MIPS64`. |
There was a problem hiding this comment.
The Chrome documentation includes values not included in the MDN documanation (e.g., arm64, mips can we update that here and add to the BCD update? Also, all values are stated as lowercase in the documentation.
| - `ARM` | |
| - : The string literal `"arm"`. Represents all versions of ARM ISA, including all 32-bit and 64-bit variants. Equivalent to `PlatformArch.ARM` (32-bit variant) and `PlatformArch.ARM64` combined into one value. | |
| - `X86_32` | |
| - : The string literal `"x86-32"`. Represents 32-bit variant of the x86 arhitecture. Equivalent to `PlatformArch.X86_32`. | |
| - `X86_64` | |
| - : The string literal `"x86-64"`. Represents 64-bit-compatiable variant of the x86 arhitecture. Equivalent to `PlatformArch.X86_64`. | |
| - `MIPS` | |
| - : The string literal `"mips"`. Represents 32-bit variant of MIPS ISA, which was never officially supported by official releases. Equivalent to `PlatformArch.MIPS`. | |
| - `MIPS64` | |
| - : The string literal `"mips64"`. Represents 64-bit variant of MIPS ISA, which was never officially supported by official releases. Equivalent to `PlatformArch.MIPS64`. | |
| - `ARM` | |
| - : The string literal `"arm"`. Represents all versions of the ARM ISA, including all 32-bit and 64-bit variants. Equivalent to [`PlatformArch.arm`](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/PlatformArch#arm) (32-bit variant) and `PlatformArch.arm64` combined into one value. | |
| - `X86_32` | |
| - : The string literal `"x86-32"`. Represents the 32-bit variant of the x86 architecture. Equivalent to [`PlatformArch.x86_32`](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/PlatformArch#x86-32) . | |
| - `X86_64` | |
| - : The string literal `"x86-64"`. Represents the 64-bit variant of the x86 architecture. Equivalent to [`PlatformArch.x86_64`](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/PlatformArch#x86-64). | |
| - `MIPS` | |
| - : The string literal `"mips"`. Represents the 32-bit variant of the MIPS ISA, which was never supported by official releases. Equivalent to `PlatformArch.mips`. | |
| - `MIPS64` | |
| - : The string literal `"mips64"`. Represents the 64-bit variant of the MIPS ISA, which was never supported by official releases. Equivalent to `PlatformArch.mips64`. |
There was a problem hiding this comment.
Copied your version and just removed extra space at the end of description for x86-64.
There was a problem hiding this comment.
The Chrome documentation includes values not included in the MDN documanation
Chromium specifies that chrome.runtime.PlatformNaclArch has value {ARM: 'arm', MIPS: 'mips', MIPS64: 'mips64', X86_32: 'x86-32', X86_64: 'x86-64'}, we already updated this document accordingly. Or did you mean that we should also update document about chrome.runtime.PlatformArch?
There was a problem hiding this comment.
@bershanskiy, sorry for not being clear about the missing documentation. I was referring to the MDN page (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/PlatformArch). So you make the comment "Equivalent to PlatformArch.mips." but the corresponding page on MDN doesn't document mips.
There was a problem hiding this comment.
This is an interesting point. We can trivially document Chromium behavior for runtime.PlatformNaclArch because the other two engines (Firefox, WebKit) omit it. This is not the case with runtime.PlatformArch. Unfortunately, all three main engines disagree on both keys and values in runtime.PlatformArch.
Here are outputs of JSON.stringify(chrome.runtime.PlatformArch, null, 2) on different browsers:
Google Chrome (matches the source)
{
"ARM": "arm",
"ARM64": "arm64",
"MIPS": "mips",
"MIPS64": "mips64",
"RISCV64": "riscv64",
"X86_32": "x86-32",
"X86_64": "x86-64"
}Firefox (source specifies only values and keys are auto-generated):
{
"AARCH64": "aarch64",
"ARM": "arm",
"PPC64": "ppc64",
"RISCV64": "riscv64",
"S390X": "s390x",
"SPARC64": "sparc64",
"X86-32": "x86-32",
"X86-64": "x86-64",
"NOARCH": "noarch"
}At the moment, I don't have access to my Safari machine, but I remember it being different from both Chrome and Firefox in some yet another way.
There was a problem hiding this comment.
@bershanskiy, still investigating but have opened a couple of draft PR:
- Add missing PlatformArch values Add missing
PlatformArchvalues #43847 - PlatformArch values support details Update to
Window.showSaveFilePicker()#29512
Please feel free to comment if necessary.
|
Thanks all! This is generally looking good, happy to do a final review once the suggested changes have been incorporated. |
ca9b0d1 to
6a6b544
Compare
rebloor
left a comment
There was a problem hiding this comment.
@bershanskiy a couple of suggestions regarding the deprecation notice and info about the "replacement"
Chromium is the only engine which supported Google Native Client (NaCl) and runtime.PlatformInfo.nacl_arch WebExtension API. Chromium removed NaCl and is currently in the process of removal of associated WebExtensions API remnants. Details: chromium/chromium@913e0c0 chromium/chromium@6e62e12 chromium/chromium@9b22796
Description
Chromium is the only engine which supported Google Native Client (NaCl) and
runtime.PlatformInfo.nacl_archWebExtension API. Chromium removed NaCl and is currently in the process of removal of associated WebExtension API remnants.Motivation
Update MDN in line with Chromium development.
Additional details
Google Chrome deprecated
runtime.PlatformInfo.nacl_archandruntime.PlatformNaclArch. Google plans to run an experiment removingnacl_archfromruntime.getPlatformInfo()and we would like to increase awareness of this deprecation. Hardcoded constant enumruntime.PlatformNaclArchis not part of this experiment, but will be removed shortly afterruntime.PlatformInfo.nacl_archremoval.Details:
chromium/chromium@913e0c0
chromium/chromium@6e62e12
chromium/chromium@9b22796
Related issues and pull requests
I will prepare BCD PR shortly.
CC @oliverdunk