Make MeasureAs= attribute work for methods that are used in Workers too

Calling activeDOMWindow() in worker context makes the renderer crash (or fails in ASSERT in debug build)

BUG=330665
TEST=fast/files/workers/worker-file-last-modified.html shouldn't crash

Review URL: https://codereview.chromium.org/124953002

git-svn-id: svn://svn.chromium.org/blink/trunk@164503 bbb929c8-8fbe-4397-9dbb-9b2b20218538