Source/WebCore: Migrate createObjectURL & revokeObjectURL to static (Class) methods.
authorarv@chromium.org <arv@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jan 2012 08:00:11 +0000 (08:00 +0000)
committerarv@chromium.org <arv@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jan 2012 08:00:11 +0000 (08:00 +0000)
commitd01877c56c47add7e85c720c2db15030fbeb50dd
tree35d2bdf153599e20db8a6db68489743b44fb70cb
parent71ee6ec5f3a8b729a8119afdcd914d4bb1b9cb84
Source/WebCore: Migrate createObjectURL & revokeObjectURL to static (Class) methods.
https://bugs.webkit.org/show_bug.cgi?id=74386

Reviewed by Adam Barth.

Test: fast/dom/DOMURL/check-instanceof-domurl-functions.html
Already Existing -
    fast/files/revoke-blob-url.html
    fast/dom/window-domurl-crash.html
    fast/files/apply-blob-url-to-img.html
    fast/files/create-blob-url-crash.html
    fast/files/workers/inline-worker-via-blob-url.html

* html/DOMURL.cpp: Added HashMap for local static objects.
(WebCore::PublicURLManager::PublicURLManager):
(WebCore::PublicURLManager::contextDestroyed):
(WebCore::PublicURLManager::blobURLs):
(WebCore::PublicURLManager::streamURLs):
(WebCore::publicURLManagerMap):
(WebCore::publicURLManager):
(WebCore::publicBlobURLs):
(WebCore::publicStreamURLs):
(WebCore::DOMURL::createObjectURL): Changed to static.
(WebCore::DOMURL::revokeObjectURL): ditto.
* html/DOMURL.h:
(WebCore::DOMURL::create):
(WebCore::DOMURL::~DOMURL):
(WebCore::DOMURL::DOMURL):
* html/DOMURL.idl:
* page/DOMWindow.cpp: Removed object initialization for DOMURL.
* page/DOMWindow.h: ditto.
* page/DOMWindow.idl: ditto.
* workers/WorkerContext.cpp: ditto.
* workers/WorkerContext.h: ditto.
* workers/WorkerContext.idl: ditto.

LayoutTests: Migrate createObjectURL & revokeObjectURL to static (Class) methods
https://bugs.webkit.org/show_bug.cgi?id=74386

Reviewed by Adam Barth.

Added test to check if createObjectURL & revokeObjectURL are static functions.

* fast/dom/DOMURL: Added.
* fast/dom/DOMURL/check-instanceof-domurl-functions-expected.txt: Added.
* fast/dom/DOMURL/check-instanceof-domurl-functions.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/DOMURL/check-instanceof-domurl-functions-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/DOMURL/check-instanceof-domurl-functions.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/DOMURL.cpp
Source/WebCore/html/DOMURL.h
Source/WebCore/html/DOMURL.idl
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DOMWindow.h
Source/WebCore/page/DOMWindow.idl
Source/WebCore/workers/WorkerContext.cpp
Source/WebCore/workers/WorkerContext.h
Source/WebCore/workers/WorkerContext.idl