New issue
Advanced search Search tips

Issue 758302 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocking:
issue 710702



Sign in to add a comment

[deviceMemory] Implement the JS API for device Memory

Project Member Reported by fmea...@chromium.org, Aug 23 2017

Issue description

The spec is described in:
https://github.com/w3c/device-memory#the-web-exposed-api

In short, navigator.deviceMemory would return an approximated value of the device memory in GB.

This is implementation tracking bug.
 
Blocking: 710702
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a4901d786da43ae56b71ee7c3936836567ee739b

commit a4901d786da43ae56b71ee7c3936836567ee739b
Author: Fadi Meawad <fmeawad@chromium.org>
Date: Thu Aug 24 22:35:10 2017

[DeviceMemory] Implement the JS API for deviceMemory

This CL introduces the JS API implementation of the deviceMemory API.

It adds an attribute to the navigator called deviceMemory that reports
the same value that is reported by the Clint Hints header.

This CL also refactor and caches the device memory value in the
MemoryCoordinator to be easily accessible from both locations
(ClientHints and Navigator).

Bug:  chromium:758302 
Change-Id: I6c8e0900b3492f940eaacf72731bf96d93f12639
Reviewed-on: https://chromium-review.googlesource.com/629264
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Shubhie Panicker <panicker@chromium.org>
Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497222}
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-navigated-expected.txt
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced-expected.txt
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-expected.txt
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/LayoutTests/fast/dom/Window/resources/window-property-collector.js
[add] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/LayoutTests/fast/dom/navigator-deviceMemory.https-expected.txt
[add] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/LayoutTests/fast/dom/navigator-deviceMemory.https.html
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/Source/core/frame/Navigator.cpp
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/Source/core/frame/Navigator.h
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/Source/core/frame/Navigator.idl
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/Source/platform/MemoryCoordinator.cpp
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/Source/platform/MemoryCoordinator.h
[add] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/Source/platform/MemoryCoordinatorTest.cpp
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/a4901d786da43ae56b71ee7c3936836567ee739b/tools/metrics/histograms/enums.xml

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ce924f715dce1d18dcec93a8cac4589f04c966e7

commit ce924f715dce1d18dcec93a8cac4589f04c966e7
Author: Fadi Meawad <fmeawad@chromium.org>
Date: Wed Aug 30 17:01:11 2017

[DeviceMemory] Ship DeviceMemory JS API

I2S: https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!msg/blink-dev/MFBsNZCkotU/hQl4pB25AgAJ

Bug:  chromium:758302 , chromium:710702 
Change-Id: I5ced6f8b73caf401583498682adefad0b8ce06e0
Reviewed-on: https://chromium-review.googlesource.com/641392
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Tim Volodine <timvolodine@chromium.org>
Reviewed-by: Shubhie Panicker <panicker@chromium.org>
Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498503}
[modify] https://crrev.com/ce924f715dce1d18dcec93a8cac4589f04c966e7/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ce924f715dce1d18dcec93a8cac4589f04c966e7/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ce924f715dce1d18dcec93a8cac4589f04c966e7/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ce924f715dce1d18dcec93a8cac4589f04c966e7/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5

Status: Fixed (was: Started)
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7bacf86ba10a26e119006365a040a1aa5ea579c3

commit 7bacf86ba10a26e119006365a040a1aa5ea579c3
Author: Fadi Meawad <fmeawad@chromium.org>
Date: Mon Sep 11 18:29:39 2017

Revert "[DeviceMemory] Ship DeviceMemory JS API"

This reverts commit ce924f715dce1d18dcec93a8cac4589f04c966e7.

Reason for revert: Postpone shipping this feature to M63.

Original change's description:
> [DeviceMemory] Ship DeviceMemory JS API
> 
> I2S: https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!msg/blink-dev/MFBsNZCkotU/hQl4pB25AgAJ
> 
> Bug:  chromium:758302 , chromium:710702 
> Change-Id: I5ced6f8b73caf401583498682adefad0b8ce06e0
> Reviewed-on: https://chromium-review.googlesource.com/641392
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> Reviewed-by: Tim Volodine <timvolodine@chromium.org>
> Reviewed-by: Shubhie Panicker <panicker@chromium.org>
> Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#498503}

TBR=chrishtr@chromium.org,fmeawad@chromium.org,haraken@chromium.org,timvolodine@chromium.org,panicker@chromium.org,dglazkov@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  chromium:758302 ,  chromium:710702 ,  chromium:763966 
Change-Id: Idd341adb7c924846ca9c25f75b7aa60e7a4f50dd
Reviewed-on: https://chromium-review.googlesource.com/660481
Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500982}
[modify] https://crrev.com/7bacf86ba10a26e119006365a040a1aa5ea579c3/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/7bacf86ba10a26e119006365a040a1aa5ea579c3/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/7bacf86ba10a26e119006365a040a1aa5ea579c3/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/7bacf86ba10a26e119006365a040a1aa5ea579c3/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 13 2017

Labels: merge-merged-3202
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/76cafeff582457d6c20052ffbead439f985bef48

commit 76cafeff582457d6c20052ffbead439f985bef48
Author: Fadi Meawad <fmeawad@chromium.org>
Date: Wed Sep 13 16:12:02 2017

Revert "[DeviceMemory] Ship DeviceMemory JS API"

This reverts commit ce924f715dce1d18dcec93a8cac4589f04c966e7.

Reason for revert: Postpone shipping this feature to M63.

Original change's description:
> [DeviceMemory] Ship DeviceMemory JS API
> 
> I2S: https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!msg/blink-dev/MFBsNZCkotU/hQl4pB25AgAJ
> 
> Bug:  chromium:758302 , chromium:710702 
> Change-Id: I5ced6f8b73caf401583498682adefad0b8ce06e0
> Reviewed-on: https://chromium-review.googlesource.com/641392
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> Reviewed-by: Tim Volodine <timvolodine@chromium.org>
> Reviewed-by: Shubhie Panicker <panicker@chromium.org>
> Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#498503}

TBR=chrishtr@chromium.org,fmeawad@chromium.org,haraken@chromium.org,timvolodine@chromium.org,panicker@chromium.org,dglazkov@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  chromium:758302 ,  chromium:710702 ,  chromium:763966 
Change-Id: Idd341adb7c924846ca9c25f75b7aa60e7a4f50dd
Reviewed-on: https://chromium-review.googlesource.com/660481
Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#500982}(cherry picked from commit 7bacf86ba10a26e119006365a040a1aa5ea579c3)
Reviewed-on: https://chromium-review.googlesource.com/665317
Cr-Commit-Position: refs/branch-heads/3202@{#204}
Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098}
[modify] https://crrev.com/76cafeff582457d6c20052ffbead439f985bef48/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/76cafeff582457d6c20052ffbead439f985bef48/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/76cafeff582457d6c20052ffbead439f985bef48/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/76cafeff582457d6c20052ffbead439f985bef48/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aaffb85b56a6da09de221425afdf5320f5038a16

commit aaffb85b56a6da09de221425afdf5320f5038a16
Author: Fadi Meawad <fmeawad@chromium.org>
Date: Thu Oct 12 23:32:38 2017

Reland "[DeviceMemory] Ship DeviceMemory JS API"

This reverts commit 7bacf86ba10a26e119006365a040a1aa5ea579c3.

Reason for revert: The API was approved.

Original change's description:
> Revert "[DeviceMemory] Ship DeviceMemory JS API"
> 
> This reverts commit ce924f715dce1d18dcec93a8cac4589f04c966e7.
> 
> Reason for revert: Postpone shipping this feature to M63.
> 
> Original change's description:
> > [DeviceMemory] Ship DeviceMemory JS API
> > 
> > I2S: https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!msg/blink-dev/MFBsNZCkotU/hQl4pB25AgAJ
> > 
> > Bug:  chromium:758302 , chromium:710702 
> > Change-Id: I5ced6f8b73caf401583498682adefad0b8ce06e0
> > Reviewed-on: https://chromium-review.googlesource.com/641392
> > Reviewed-by: Kentaro Hara <haraken@chromium.org>
> > Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> > Reviewed-by: Tim Volodine <timvolodine@chromium.org>
> > Reviewed-by: Shubhie Panicker <panicker@chromium.org>
> > Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#498503}
> 
> TBR=chrishtr@chromium.org,fmeawad@chromium.org,haraken@chromium.org,timvolodine@chromium.org,panicker@chromium.org,dglazkov@chromium.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug:  chromium:758302 ,  chromium:710702 ,  chromium:763966 
> Change-Id: Idd341adb7c924846ca9c25f75b7aa60e7a4f50dd
> Reviewed-on: https://chromium-review.googlesource.com/660481
> Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
> Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#500982}

TBR=chrishtr@chromium.org,fmeawad@chromium.org,haraken@chromium.org,timvolodine@chromium.org,panicker@chromium.org,dglazkov@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  chromium:758302 ,  chromium:710702 ,  chromium:763966 
Change-Id: I4099ca458088ddfde32e8af43dda26d6cd7045ea
Reviewed-on: https://chromium-review.googlesource.com/716916
Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Shubhie Panicker <panicker@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508536}
[modify] https://crrev.com/aaffb85b56a6da09de221425afdf5320f5038a16/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/aaffb85b56a6da09de221425afdf5320f5038a16/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/aaffb85b56a6da09de221425afdf5320f5038a16/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/aaffb85b56a6da09de221425afdf5320f5038a16/third_party/WebKit/Source/platform/runtime_enabled_features.json5

Project Member

Comment 8 by bugdroid1@chromium.org, Jan 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d591aaa4bb924b5532981301d713be25087e0e33

commit d591aaa4bb924b5532981301d713be25087e0e33
Author: Fadi Meawad <fmeawad@chromium.org>
Date: Mon Jan 08 18:34:16 2018

[deviceMemory] Implement navigator.deviceMemory for workers

The original spec specified that this would also work for workers,
this CL add the deviceMemory functionality to the workers by moving the
deviceMemory getter it its own IDL.

In this CL, the tests are also upstreamed.

Bug:  chromium:758302 , chromium:741921 
Change-Id: I9852d08e5a96172bcacf62a353b81a48e902fa95
Reviewed-on: https://chromium-review.googlesource.com/849512
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Shubhie Panicker <panicker@chromium.org>
Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527681}
[add] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/LayoutTests/external/wpt/navigator/device-memory.https.any.js
[delete] https://crrev.com/6d25f4059bbfb5c6567f74cc917233f408564634/third_party/WebKit/LayoutTests/fast/dom/navigator-deviceMemory.https-expected.txt
[delete] https://crrev.com/6d25f4059bbfb5c6567f74cc917233f408564634/third_party/WebKit/LayoutTests/fast/dom/navigator-deviceMemory.https.html
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/Source/core/core_idl_files.gni
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/Source/core/frame/BUILD.gn
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/Source/core/frame/Navigator.cpp
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/Source/core/frame/Navigator.h
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/Source/core/frame/Navigator.idl
[add] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/Source/core/frame/NavigatorDeviceMemory.cpp
[add] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/Source/core/frame/NavigatorDeviceMemory.h
[add] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/Source/core/frame/NavigatorDeviceMemory.idl
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/Source/core/workers/WorkerNavigator.h
[modify] https://crrev.com/d591aaa4bb924b5532981301d713be25087e0e33/third_party/WebKit/Source/core/workers/WorkerNavigator.idl

Sign in to add a comment