Changeset 286550 in webkit
- Timestamp:
- Dec 6, 2021 10:46:03 AM (8 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 28 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/Window/resources/window-property-collector.js (modified) (1 diff)
-
LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt (modified) (2 diffs)
-
LayoutTests/fast/dom/navigator-hardwareConcurrency-expected.txt (added)
-
LayoutTests/fast/dom/navigator-hardwareConcurrency.html (added)
-
LayoutTests/fast/workers/resources/worker-navigator.js (modified) (1 diff)
-
LayoutTests/fast/workers/worker-navigator-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/workers/WorkerNavigator-hardware-concurrency.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/ipad/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/mac/fast/dom/navigator-detached-no-crash-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/win/fast/dom/navigator-detached-no-crash-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/wincairo/fast/dom/navigator-detached-no-crash-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/wpe/fast/dom/navigator-detached-no-crash-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/Navigator.idl (modified) (1 diff)
-
Source/WebCore/page/NavigatorBase.cpp (modified) (1 diff)
-
Source/WebCore/page/NavigatorBase.h (modified) (1 diff)
-
Source/WebCore/page/WorkerNavigator.idl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r286546 r286550 1 2021-12-06 Tadeu Zagallo <tzagallo@apple.com> 2 3 Restore navigator.hardwareConcurrency 4 https://bugs.webkit.org/show_bug.cgi?id=233381 5 <rdar://85023911> 6 7 Reviewed by Saam Barati. 8 9 * fast/dom/Window/resources/window-property-collector.js: 10 (emitExpectedResult): 11 * fast/dom/navigator-detached-no-crash-expected.txt: 12 * fast/dom/navigator-hardwareConcurrency-expected.txt: Added. 13 * fast/dom/navigator-hardwareConcurrency.html: Added. 14 * fast/workers/resources/worker-navigator.js: 15 * fast/workers/worker-navigator-expected.txt: 16 * platform/glib/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt: 17 * platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt: 18 * platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 19 * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 20 * platform/ipad/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 21 * platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt: 22 * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 23 * platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt: 24 * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 25 * platform/mac/fast/dom/navigator-detached-no-crash-expected.txt: 26 * platform/win/fast/dom/navigator-detached-no-crash-expected.txt: 27 * platform/wincairo/fast/dom/navigator-detached-no-crash-expected.txt: 28 * platform/wpe/fast/dom/navigator-detached-no-crash-expected.txt: 29 * platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 30 1 31 2021-12-06 Said Abou-Hallawa <said@apple.com> 2 32 -
trunk/LayoutTests/fast/dom/Window/resources/window-property-collector.js
r219403 r286550 66 66 case "navigator.appCodeName": 67 67 case "navigator.appName": 68 case "navigator.hardwareConcurrency": 68 69 case "navigator.language": 69 70 case "navigator.onLine": -
trunk/LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt
r280467 r286550 11 11 navigator.credentials is OK 12 12 navigator.getStorageUpdates() is OK 13 navigator.hardwareConcurrency is OK 13 14 navigator.javaEnabled() is OK 14 15 navigator.language is OK … … 39 40 navigator.credentials is OK 40 41 navigator.getStorageUpdates() is OK 42 navigator.hardwareConcurrency is OK 41 43 navigator.javaEnabled() is OK 42 44 navigator.language is OK -
trunk/LayoutTests/fast/workers/resources/worker-navigator.js
r219403 r286550 12 12 worker.postMessage("eval typeof navigator"); 13 13 worker.postMessage("eval navigator"); 14 15 // NavigatorConcurrentHardware 16 worker.postMessage("eval navigator.hardwareConcurrency >= 1 && navigator.hardwareConcurrency <= 8"); 14 17 15 18 // NavigatorID -
trunk/LayoutTests/fast/workers/worker-navigator-expected.txt
r219403 r286550 3 3 typeof navigator: object 4 4 navigator: [object WorkerNavigator] 5 navigator.hardwareConcurrency >= 1 && navigator.hardwareConcurrency <= 8: true 5 6 navigator.appCodeName === 'Mozilla': true 6 7 navigator.appName === 'Netscape': true -
trunk/LayoutTests/imported/w3c/ChangeLog
r286490 r286550 1 2021-12-06 Tadeu Zagallo <tzagallo@apple.com> 2 3 Restore navigator.hardwareConcurrency 4 https://bugs.webkit.org/show_bug.cgi?id=233381 5 <rdar://85023911> 6 7 Reviewed by Saam Barati. 8 9 * web-platform-tests/html/dom/idlharness.https-expected.txt: 10 * web-platform-tests/html/dom/idlharness.worker-expected.txt: 11 * web-platform-tests/workers/WorkerNavigator-hardware-concurrency.any.worker-expected.txt: 12 1 13 2021-12-03 Sergio Villar Senin <svillar@igalia.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r285478 r286550 4618 4618 PASS Navigator interface: attribute mimeTypes 4619 4619 PASS Navigator interface: operation javaEnabled() 4620 FAIL Navigator interface: attribute hardwareConcurrency assert_true: The prototype object must have a property "hardwareConcurrency" expected true got false 4620 PASS Navigator interface: attribute hardwareConcurrency 4621 4621 PASS Navigator must be primary interface of window.navigator 4622 4622 PASS Stringification of window.navigator … … 4643 4643 PASS Navigator interface: window.navigator must inherit property "mimeTypes" with the proper type 4644 4644 PASS Navigator interface: window.navigator must inherit property "javaEnabled()" with the proper type 4645 FAIL Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type assert_inherits: property "hardwareConcurrency" not found in prototype chain 4645 PASS Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type 4646 4646 PASS PluginArray interface: existence and properties of interface object 4647 4647 PASS PluginArray interface object length -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt
r285346 r286550 762 762 PASS WorkerNavigator interface: attribute languages 763 763 PASS WorkerNavigator interface: attribute onLine 764 FAIL WorkerNavigator interface: attribute hardwareConcurrency assert_true: The prototype object must have a property "hardwareConcurrency" expected true got false 764 PASS WorkerNavigator interface: attribute hardwareConcurrency 765 765 PASS WorkerNavigator must be primary interface of self.navigator 766 766 PASS Stringification of self.navigator … … 779 779 PASS WorkerNavigator interface: self.navigator must inherit property "languages" with the proper type 780 780 PASS WorkerNavigator interface: self.navigator must inherit property "onLine" with the proper type 781 FAIL WorkerNavigator interface: self.navigator must inherit property "hardwareConcurrency" with the proper type assert_inherits: property "hardwareConcurrency" not found in prototype chain 781 PASS WorkerNavigator interface: self.navigator must inherit property "hardwareConcurrency" with the proper type 782 782 PASS WorkerLocation interface: existence and properties of interface object 783 783 PASS WorkerLocation interface object length -
trunk/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerNavigator-hardware-concurrency.any.worker-expected.txt
r253453 r286550 1 1 2 FAIL Test worker navigator hardware concurrency. assert_true: expected true got false 2 PASS Test worker navigator hardware concurrency. 3 3 -
trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt
r285708 r286550 762 762 PASS WorkerNavigator interface: attribute languages 763 763 PASS WorkerNavigator interface: attribute onLine 764 FAIL WorkerNavigator interface: attribute hardwareConcurrency assert_true: The prototype object must have a property "hardwareConcurrency" expected true got false 764 PASS WorkerNavigator interface: attribute hardwareConcurrency 765 765 PASS WorkerNavigator must be primary interface of self.navigator 766 766 PASS Stringification of self.navigator … … 779 779 PASS WorkerNavigator interface: self.navigator must inherit property "languages" with the proper type 780 780 PASS WorkerNavigator interface: self.navigator must inherit property "onLine" with the proper type 781 FAIL WorkerNavigator interface: self.navigator must inherit property "hardwareConcurrency" with the proper type assert_inherits: property "hardwareConcurrency" not found in prototype chain 781 PASS WorkerNavigator interface: self.navigator must inherit property "hardwareConcurrency" with the proper type 782 782 PASS WorkerLocation interface: existence and properties of interface object 783 783 PASS WorkerLocation interface object length -
trunk/LayoutTests/platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt
r285253 r286550 8 8 navigator.cookieEnabled is OK 9 9 navigator.getStorageUpdates() is OK 10 navigator.hardwareConcurrency is OK 10 11 navigator.javaEnabled() is OK 11 12 navigator.language is OK … … 37 38 navigator.cookieEnabled is OK 38 39 navigator.getStorageUpdates() is OK 40 navigator.hardwareConcurrency is OK 39 41 navigator.javaEnabled() is OK 40 42 navigator.language is OK -
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r285708 r286550 4840 4840 PASS Navigator interface: operation javaEnabled() 4841 4841 FAIL Navigator interface: attribute pdfViewerEnabled assert_true: The prototype object must have a property "pdfViewerEnabled" expected true got false 4842 FAIL Navigator interface: attribute hardwareConcurrency assert_true: The prototype object must have a property "hardwareConcurrency" expected true got false 4842 PASS Navigator interface: attribute hardwareConcurrency 4843 4843 PASS Navigator must be primary interface of window.navigator 4844 4844 PASS Stringification of window.navigator … … 4866 4866 PASS Navigator interface: window.navigator must inherit property "javaEnabled()" with the proper type 4867 4867 FAIL Navigator interface: window.navigator must inherit property "pdfViewerEnabled" with the proper type assert_inherits: property "pdfViewerEnabled" not found in prototype chain 4868 FAIL Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type assert_inherits: property "hardwareConcurrency" not found in prototype chain 4868 PASS Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type 4869 4869 PASS PluginArray interface: existence and properties of interface object 4870 4870 PASS PluginArray interface object length -
trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r285478 r286550 4796 4796 PASS Navigator interface: attribute mimeTypes 4797 4797 PASS Navigator interface: operation javaEnabled() 4798 FAIL Navigator interface: attribute hardwareConcurrency assert_true: The prototype object must have a property "hardwareConcurrency" expected true got false 4798 PASS Navigator interface: attribute hardwareConcurrency 4799 4799 PASS Navigator must be primary interface of window.navigator 4800 4800 PASS Stringification of window.navigator … … 4821 4821 PASS Navigator interface: window.navigator must inherit property "mimeTypes" with the proper type 4822 4822 PASS Navigator interface: window.navigator must inherit property "javaEnabled()" with the proper type 4823 FAIL Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type assert_inherits: property "hardwareConcurrency" not found in prototype chain 4823 PASS Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type 4824 4824 PASS ImageBitmap interface: existence and properties of interface object 4825 4825 PASS ImageBitmap interface object length -
trunk/LayoutTests/platform/ipad/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r285478 r286550 4806 4806 PASS Navigator interface: attribute mimeTypes 4807 4807 PASS Navigator interface: operation javaEnabled() 4808 FAIL Navigator interface: attribute hardwareConcurrency assert_true: The prototype object must have a property "hardwareConcurrency" expected true got false 4808 PASS Navigator interface: attribute hardwareConcurrency 4809 4809 PASS Navigator must be primary interface of window.navigator 4810 4810 PASS Stringification of window.navigator … … 4831 4831 PASS Navigator interface: window.navigator must inherit property "mimeTypes" with the proper type 4832 4832 PASS Navigator interface: window.navigator must inherit property "javaEnabled()" with the proper type 4833 FAIL Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type assert_inherits: property "hardwareConcurrency" not found in prototype chain 4833 PASS Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type 4834 4834 PASS ImageBitmap interface: existence and properties of interface object 4835 4835 PASS ImageBitmap interface object length -
trunk/LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt
r285012 r286550 6 6 navigator.cookieEnabled is OK 7 7 navigator.getStorageUpdates() is OK 8 navigator.hardwareConcurrency is OK 8 9 navigator.javaEnabled() is OK 9 10 navigator.language is OK … … 32 33 navigator.cookieEnabled is OK 33 34 navigator.getStorageUpdates() is OK 35 navigator.hardwareConcurrency is OK 34 36 navigator.javaEnabled() is OK 35 37 navigator.language is OK -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r285478 r286550 4840 4840 PASS Navigator interface: operation javaEnabled() 4841 4841 FAIL Navigator interface: attribute pdfViewerEnabled assert_true: The prototype object must have a property "pdfViewerEnabled" expected true got false 4842 FAIL Navigator interface: attribute hardwareConcurrency assert_true: The prototype object must have a property "hardwareConcurrency" expected true got false 4842 PASS Navigator interface: attribute hardwareConcurrency 4843 4843 PASS Navigator must be primary interface of window.navigator 4844 4844 PASS Stringification of window.navigator … … 4866 4866 PASS Navigator interface: window.navigator must inherit property "javaEnabled()" with the proper type 4867 4867 FAIL Navigator interface: window.navigator must inherit property "pdfViewerEnabled" with the proper type assert_inherits: property "pdfViewerEnabled" not found in prototype chain 4868 FAIL Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type assert_inherits: property "hardwareConcurrency" not found in prototype chain 4868 PASS Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type 4869 4869 PASS PluginArray interface: existence and properties of interface object 4870 4870 PASS PluginArray interface object length -
trunk/LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt
r285012 r286550 10 10 navigator.credentials is OK 11 11 navigator.getStorageUpdates() is OK 12 navigator.hardwareConcurrency is OK 12 13 navigator.isLoggedIn() is OK 13 14 navigator.javaEnabled() is OK … … 46 47 navigator.credentials is OK 47 48 navigator.getStorageUpdates() is OK 49 navigator.hardwareConcurrency is OK 48 50 navigator.isLoggedIn() is OK 49 51 navigator.javaEnabled() is OK -
trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r285478 r286550 4806 4806 PASS Navigator interface: attribute mimeTypes 4807 4807 PASS Navigator interface: operation javaEnabled() 4808 FAIL Navigator interface: attribute hardwareConcurrency assert_true: The prototype object must have a property "hardwareConcurrency" expected true got false 4808 PASS Navigator interface: attribute hardwareConcurrency 4809 4809 PASS Navigator must be primary interface of window.navigator 4810 4810 PASS Stringification of window.navigator … … 4831 4831 PASS Navigator interface: window.navigator must inherit property "mimeTypes" with the proper type 4832 4832 PASS Navigator interface: window.navigator must inherit property "javaEnabled()" with the proper type 4833 FAIL Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type assert_inherits: property "hardwareConcurrency" not found in prototype chain 4833 PASS Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type 4834 4834 PASS ImageBitmap interface: existence and properties of interface object 4835 4835 PASS ImageBitmap interface object length -
trunk/LayoutTests/platform/mac/fast/dom/navigator-detached-no-crash-expected.txt
r277468 r286550 10 10 navigator.credentials is OK 11 11 navigator.getStorageUpdates() is OK 12 navigator.hardwareConcurrency is OK 12 13 navigator.javaEnabled() is OK 13 14 navigator.language is OK … … 36 37 navigator.credentials is OK 37 38 navigator.getStorageUpdates() is OK 39 navigator.hardwareConcurrency is OK 38 40 navigator.javaEnabled() is OK 39 41 navigator.language is OK -
trunk/LayoutTests/platform/win/fast/dom/navigator-detached-no-crash-expected.txt
r267988 r286550 10 10 navigator.credentials is OK 11 11 navigator.getStorageUpdates() is OK 12 navigator.hardwareConcurrency is OK 12 13 navigator.javaEnabled() is OK 13 14 navigator.language is OK … … 32 33 navigator.credentials is OK 33 34 navigator.getStorageUpdates() is OK 35 navigator.hardwareConcurrency is OK 34 36 navigator.javaEnabled() is OK 35 37 navigator.language is OK -
trunk/LayoutTests/platform/wincairo/fast/dom/navigator-detached-no-crash-expected.txt
r267988 r286550 8 8 navigator.cookieEnabled is OK 9 9 navigator.getStorageUpdates() is OK 10 navigator.hardwareConcurrency is OK 10 11 navigator.javaEnabled() is OK 11 12 navigator.language is OK … … 28 29 navigator.cookieEnabled is OK 29 30 navigator.getStorageUpdates() is OK 31 navigator.hardwareConcurrency is OK 30 32 navigator.javaEnabled() is OK 31 33 navigator.language is OK -
trunk/LayoutTests/platform/wpe/fast/dom/navigator-detached-no-crash-expected.txt
r285253 r286550 8 8 navigator.cookieEnabled is OK 9 9 navigator.getStorageUpdates() is OK 10 navigator.hardwareConcurrency is OK 10 11 navigator.javaEnabled() is OK 11 12 navigator.language is OK … … 38 39 navigator.cookieEnabled is OK 39 40 navigator.getStorageUpdates() is OK 41 navigator.hardwareConcurrency is OK 40 42 navigator.javaEnabled() is OK 41 43 navigator.language is OK -
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r285708 r286550 4840 4840 PASS Navigator interface: operation javaEnabled() 4841 4841 FAIL Navigator interface: attribute pdfViewerEnabled assert_true: The prototype object must have a property "pdfViewerEnabled" expected true got false 4842 FAIL Navigator interface: attribute hardwareConcurrency assert_true: The prototype object must have a property "hardwareConcurrency" expected true got false 4842 PASS Navigator interface: attribute hardwareConcurrency 4843 4843 PASS Navigator must be primary interface of window.navigator 4844 4844 PASS Stringification of window.navigator … … 4866 4866 PASS Navigator interface: window.navigator must inherit property "javaEnabled()" with the proper type 4867 4867 FAIL Navigator interface: window.navigator must inherit property "pdfViewerEnabled" with the proper type assert_inherits: property "pdfViewerEnabled" not found in prototype chain 4868 FAIL Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type assert_inherits: property "hardwareConcurrency" not found in prototype chain 4868 PASS Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type 4869 4869 PASS PluginArray interface: existence and properties of interface object 4870 4870 PASS PluginArray interface object length -
trunk/Source/WebCore/ChangeLog
r286546 r286550 1 2021-12-06 Tadeu Zagallo <tzagallo@apple.com> 2 3 Restore navigator.hardwareConcurrency 4 https://bugs.webkit.org/show_bug.cgi?id=233381 5 <rdar://85023911> 6 7 Reviewed by Saam Barati. 8 9 Navigator.hardwareConcurrency was removed in r219379, but it is now used 10 by emscripten to implement std::thread::hardware_concurrency() 11 12 Test: fast/dom/navigator-hardwareConcurrency.html 13 14 * page/Navigator.idl: 15 * page/NavigatorBase.cpp: 16 (WebCore::NavigatorBase::hardwareConcurrency): 17 * page/NavigatorBase.h: 18 * page/WorkerNavigator.idl: 19 1 20 2021-12-06 Said Abou-Hallawa <said@apple.com> 2 21 [GPU Process] (REGRESSION r285597): Set the filterRegion of the CSSFilter after it is created -
trunk/Source/WebCore/page/Navigator.idl
r285376 r286550 26 26 [Conditional=NAVIGATOR_STANDALONE] readonly attribute boolean standalone; 27 27 28 readonly attribute unsigned long long hardwareConcurrency; 29 28 30 // Non-standard. 29 31 // FIXME: Remove this. WebKit is the only engine that still has this. -
trunk/Source/WebCore/page/NavigatorBase.cpp
r286284 r286550 176 176 #endif 177 177 178 int NavigatorBase::hardwareConcurrency() 179 { 180 static int numberOfCores; 181 182 static std::once_flag once; 183 std::call_once(once, [] { 184 // Enforce a maximum for the number of cores reported to mitigate 185 // fingerprinting for the minority of machines with large numbers of cores. 186 // If machines with more than 8 cores become commonplace, we should bump this number. 187 // see https://bugs.webkit.org/show_bug.cgi?id=132588 for the 188 // rationale behind this decision. 189 if (WTF::numberOfProcessorCores() < 8) 190 numberOfCores = 4; 191 else 192 numberOfCores = 8; 193 }); 194 195 return numberOfCores; 196 } 197 178 198 } // namespace WebCore -
trunk/Source/WebCore/page/NavigatorBase.h
r286459 r286550 65 65 WebLockManager& locks(); 66 66 67 static int hardwareConcurrency(); 68 67 69 protected: 68 70 explicit NavigatorBase(ScriptExecutionContext*); -
trunk/Source/WebCore/page/WorkerNavigator.idl
r285376 r286550 32 32 JSCustomMarkFunction, 33 33 ] interface WorkerNavigator { 34 readonly attribute unsigned long long hardwareConcurrency; 34 35 }; 35 36
Note: See TracChangeset
for help on using the changeset viewer.