Changeset 106914 in webkit
- Timestamp:
- Feb 7, 2012 1:44:25 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r106912 r106914 1 2012-02-07 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r106912. 4 http://trac.webkit.org/changeset/106912 5 https://bugs.webkit.org/show_bug.cgi?id=77947 6 7 "AppleWebKit build is broken" (Requested by haraken on 8 #webkit). 9 10 * fast/dom/DOMURL/check-instanceof-domurl-functions-expected.txt: Removed. 11 * fast/dom/DOMURL/check-instanceof-domurl-functions.html: Removed. 12 1 13 2012-02-07 Kaustubh Atrawalkar <kaustubh@motorola.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r106913 r106914 1 2012-02-07 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r106912. 4 http://trac.webkit.org/changeset/106912 5 https://bugs.webkit.org/show_bug.cgi?id=77947 6 7 "AppleWebKit build is broken" (Requested by haraken on 8 #webkit). 9 10 * dom/ScriptExecutionContext.cpp: 11 (WebCore::ScriptExecutionContext::~ScriptExecutionContext): 12 (WebCore): 13 * dom/ScriptExecutionContext.h: 14 (WebCore): 15 (ScriptExecutionContext): 16 * html/DOMURL.cpp: 17 (WebCore::DOMURL::DOMURL): 18 (WebCore): 19 (WebCore::DOMURL::~DOMURL): 20 (WebCore::DOMURL::contextDestroyed): 21 (WebCore::DOMURL::createObjectURL): 22 (WebCore::DOMURL::revokeObjectURL): 23 * html/DOMURL.h: 24 (WebCore::DOMURL::create): 25 (DOMURL): 26 * html/DOMURL.idl: 27 * html/PublicURLManager.h: Removed. 28 * page/DOMWindow.cpp: 29 (WebCore): 30 (WebCore::DOMWindow::webkitURL): 31 * page/DOMWindow.h: 32 (DOMWindow): 33 * page/DOMWindow.idl: 34 * workers/WorkerContext.cpp: 35 (WebCore): 36 (WebCore::WorkerContext::webkitURL): 37 * workers/WorkerContext.h: 38 (WorkerContext): 39 * workers/WorkerContext.idl: 40 1 41 2012-02-07 Kentaro Hara <haraken@chromium.org> 2 42 -
trunk/Source/WebCore/dom/ScriptExecutionContext.cpp
r106912 r106914 39 39 #include "FileThread.h" 40 40 #include "MessagePort.h" 41 #include "PublicURLManager.h"42 41 #include "ScriptCallStack.h" 43 42 #include "SecurityOrigin.h" … … 127 126 m_fileThread = 0; 128 127 } 129 #endif130 #if ENABLE(BLOB)131 if (m_publicURLManager)132 m_publicURLManager->contextDestroyed();133 128 #endif 134 129 } … … 391 386 #endif 392 387 393 #if ENABLE(BLOB)394 PublicURLManager& ScriptExecutionContext::publicURLManager()395 {396 if (!m_publicURLManager)397 m_publicURLManager = PublicURLManager::create();398 return *m_publicURLManager;399 }400 #endif401 402 388 void ScriptExecutionContext::adjustMinimumTimerInterval(double oldMinimumTimerInterval) 403 389 { -
trunk/Source/WebCore/dom/ScriptExecutionContext.h
r106912 r106914 31 31 #include "ConsoleTypes.h" 32 32 #include "KURL.h" 33 #include "PublicURLManager.h"34 33 #include "ScriptCallStack.h" 35 34 #include "SecurityContext.h" … … 55 54 class MessagePort; 56 55 57 #if ENABLE(BLOB)58 class PublicURLManager;59 #endif60 56 #if ENABLE(SQL_DATABASE) 61 57 class Database; … … 108 104 virtual void stopActiveDOMObjects(); 109 105 110 #if ENABLE(BLOB)111 PublicURLManager& publicURLManager();112 #endif113 106 void didCreateActiveDOMObject(ActiveDOMObject*, void* upcastPointer); 114 107 void willDestroyActiveDOMObject(ActiveDOMObject*); … … 213 206 class PendingException; 214 207 OwnPtr<Vector<OwnPtr<PendingException> > > m_pendingExceptions; 215 #if ENABLE(BLOB)216 OwnPtr<PublicURLManager> m_publicURLManager;217 #endif218 208 219 209 #if ENABLE(SQL_DATABASE) -
trunk/Source/WebCore/html/DOMURL.cpp
r106912 r106914 1 1 /* 2 2 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Motorola Mobility Inc.4 3 * 5 4 * Redistribution and use in source and binary forms, with or without … … 31 30 #include "DOMURL.h" 32 31 33 #include "ActiveDOMObject.h"34 32 #include "Blob.h" 35 33 #include "BlobURL.h" 36 34 #include "KURL.h" 37 #include "PublicURLManager.h"38 35 #include "ScriptExecutionContext.h" 39 #include "SecurityOrigin.h"40 36 #include "ThreadableBlobRegistry.h" 41 #include <wtf/PassOwnPtr.h>42 37 #include <wtf/MainThread.h> 43 38 … … 49 44 namespace WebCore { 50 45 46 DOMURL::DOMURL(ScriptExecutionContext* scriptExecutionContext) 47 : ContextDestructionObserver(scriptExecutionContext) 48 { 49 } 50 51 DOMURL::~DOMURL() 52 { 53 } 54 55 void DOMURL::contextDestroyed() 56 { 57 ContextDestructionObserver::contextDestroyed(); 58 59 HashSet<String>::iterator publicBlobURLsEnd = m_publicBlobURLs.end(); 60 for (HashSet<String>::iterator iter = m_publicBlobURLs.begin(); iter != publicBlobURLsEnd; ++iter) 61 ThreadableBlobRegistry::unregisterBlobURL(KURL(ParsedURLString, *iter)); 62 51 63 #if ENABLE(MEDIA_STREAM) 52 String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, MediaStream* stream) 64 HashSet<String>::iterator publicStreamURLsEnd = m_publicStreamURLs.end(); 65 for (HashSet<String>::iterator iter = m_publicStreamURLs.begin(); iter != publicStreamURLsEnd; ++iter) 66 MediaStreamRegistry::registry().unregisterMediaStreamURL(KURL(ParsedURLString, *iter)); 67 #endif 68 } 69 70 #if ENABLE(MEDIA_STREAM) 71 String DOMURL::createObjectURL(MediaStream* stream) 53 72 { 54 if (! scriptExecutionContext || !stream)73 if (!m_scriptExecutionContext || !stream) 55 74 return String(); 56 75 57 KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext ->securityOrigin());76 KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext()->securityOrigin()); 58 77 if (publicURL.isEmpty()) 59 78 return String(); … … 63 82 64 83 MediaStreamRegistry::registry().registerMediaStreamURL(publicURL, stream); 65 scriptExecutionContext->publicURLManager().streamURLs().add(publicURL.string());84 m_publicStreamURLs.add(publicURL.string()); 66 85 67 86 return publicURL.string(); … … 69 88 #endif 70 89 71 String DOMURL::createObjectURL( ScriptExecutionContext* scriptExecutionContext,Blob* blob)90 String DOMURL::createObjectURL(Blob* blob) 72 91 { 73 if (! scriptExecutionContext || !blob)92 if (!m_scriptExecutionContext || !blob) 74 93 return String(); 75 94 76 KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext ->securityOrigin());95 KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext()->securityOrigin()); 77 96 if (publicURL.isEmpty()) 78 97 return String(); 79 98 80 99 ThreadableBlobRegistry::registerBlobURL(publicURL, blob->url()); 81 scriptExecutionContext->publicURLManager().blobURLs().add(publicURL.string());100 m_publicBlobURLs.add(publicURL.string()); 82 101 83 102 return publicURL.string(); 84 103 } 85 104 86 void DOMURL::revokeObjectURL( ScriptExecutionContext* scriptExecutionContext,const String& urlString)105 void DOMURL::revokeObjectURL(const String& urlString) 87 106 { 88 if (! scriptExecutionContext)107 if (!m_scriptExecutionContext) 89 108 return; 90 109 91 110 KURL url(KURL(), urlString); 92 111 93 HashSet<String>& blobURLs = scriptExecutionContext->publicURLManager().blobURLs(); 94 if (blobURLs.contains(url.string())) { 112 if (m_publicBlobURLs.contains(url.string())) { 95 113 ThreadableBlobRegistry::unregisterBlobURL(url); 96 blobURLs.remove(url.string());114 m_publicBlobURLs.remove(url.string()); 97 115 } 98 116 99 117 #if ENABLE(MEDIA_STREAM) 100 HashSet<String>& streamURLs = scriptExecutionContext->publicURLManager().streamURLs(); 101 if (streamURLs.contains(url.string())) { 118 if (m_publicStreamURLs.contains(url.string())) { 102 119 // FIXME: make sure of this assertion below. Raise a spec question if required. 103 120 // Since WebWorkers cannot obtain Stream objects, we should be on the main thread. 104 121 ASSERT(isMainThread()); 105 122 MediaStreamRegistry::registry().unregisterMediaStreamURL(url); 106 streamURLs.remove(url.string());123 m_publicStreamURLs.remove(url.string()); 107 124 } 108 125 #endif -
trunk/Source/WebCore/html/DOMURL.h
r106912 r106914 1 1 /* 2 2 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Motorola Mobility Inc.4 3 * 5 4 * Redistribution and use in source and binary forms, with or without … … 28 27 #define DOMURL_h 29 28 30 #include "KURL.h" 29 #if ENABLE(BLOB) 30 31 #include "ActiveDOMObject.h" 31 32 #include "PlatformString.h" 32 33 #include <wtf/HashSet.h> … … 40 41 class ScriptExecutionContext; 41 42 42 class DOMURL : public RefCounted<DOMURL> { 43 class DOMURL : public RefCounted<DOMURL>, public ContextDestructionObserver { 44 public: 45 static PassRefPtr<DOMURL> create(ScriptExecutionContext* scriptExecutionContext) { return adoptRef(new DOMURL(scriptExecutionContext)); } 46 ~DOMURL(); 43 47 44 public: 45 static PassRefPtr<DOMURL> create() { return adoptRef(new DOMURL); } 48 #if ENABLE(MEDIA_STREAM) 49 String createObjectURL(MediaStream*); 50 #endif 51 String createObjectURL(Blob*); 52 void revokeObjectURL(const String&); 46 53 47 #if ENABLE(BLOB) 48 static void contextDestroyed(ScriptExecutionContext*);54 private: 55 explicit DOMURL(ScriptExecutionContext*); 49 56 50 static String createObjectURL(ScriptExecutionContext*, Blob*); 51 static void revokeObjectURL(ScriptExecutionContext*, const String&); 57 virtual void contextDestroyed(); 58 59 HashSet<String> m_publicBlobURLs; 52 60 #if ENABLE(MEDIA_STREAM) 53 static String createObjectURL(ScriptExecutionContext*, MediaStream*); 54 #endif 61 HashSet<String> m_publicStreamURLs; 55 62 #endif 56 63 }; … … 58 65 } // namespace WebCore 59 66 67 #endif // ENABLE(BLOB) 68 60 69 #endif // DOMURL_h -
trunk/Source/WebCore/html/DOMURL.idl
r106912 r106914 1 1 /* 2 2 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Motorola Mobility Inc.4 3 * 5 4 * Redistribution and use in source and binary forms, with or without … … 28 27 interface [ 29 28 Conditional=BLOB, 30 Constructor,29 OmitConstructor, 31 30 GenerateNativeConverter, 32 31 JSGenerateToJS, … … 34 33 ] DOMURL { 35 34 #if defined(ENABLE_MEDIA_STREAM) && ENABLE_MEDIA_STREAM 36 static [CallWith=ScriptExecutionContext,ConvertNullStringTo=Undefined] DOMString createObjectURL(in MediaStream stream);35 [ConvertNullStringTo=Undefined] DOMString createObjectURL(in MediaStream stream); 37 36 #endif 38 static [CallWith=ScriptExecutionContext,ConvertNullStringTo=Undefined] DOMString createObjectURL(in Blob blob);39 static [CallWith=ScriptExecutionContext]void revokeObjectURL(in DOMString url);37 [ConvertNullStringTo=Undefined] DOMString createObjectURL(in Blob blob); 38 void revokeObjectURL(in DOMString url); 40 39 }; 41 40 } -
trunk/Source/WebCore/page/DOMWindow.cpp
r106912 r106914 1898 1898 } 1899 1899 1900 #if ENABLE(BLOB) 1901 DOMURL* DOMWindow::webkitURL() const 1902 { 1903 if (!m_domURL && isCurrentlyDisplayedInFrame()) 1904 m_domURL = DOMURL::create(this->scriptExecutionContext()); 1905 return m_domURL.get(); 1906 } 1907 #endif 1908 1900 1909 #if ENABLE(QUOTA) 1901 1910 StorageInfo* DOMWindow::webkitStorageInfo() const -
trunk/Source/WebCore/page/DOMWindow.h
r106912 r106914 352 352 using RefCounted<DOMWindow>::deref; 353 353 354 #if ENABLE(BLOB) 355 DOMURL* webkitURL() const; 356 #endif 357 354 358 #if ENABLE(DEVICE_ORIENTATION) 355 359 DEFINE_ATTRIBUTE_EVENT_LISTENER(devicemotion); -
trunk/Source/WebCore/page/DOMWindow.idl
r106912 r106914 783 783 attribute [Conditional=BLOB] WebKitBlobBuilderConstructor WebKitBlobBuilder; 784 784 785 attribute [Conditional=BLOB] DOMURLConstructorwebkitURL;785 readonly attribute [Conditional=BLOB] DOMURL webkitURL; 786 786 787 787 #if defined(ENABLE_QUOTA) && ENABLE_QUOTA -
trunk/Source/WebCore/workers/WorkerContext.cpp
r106912 r106914 378 378 } 379 379 380 #if ENABLE(BLOB) 381 DOMURL* WorkerContext::webkitURL() const 382 { 383 if (!m_domURL) 384 m_domURL = DOMURL::create(this->scriptExecutionContext()); 385 return m_domURL.get(); 386 } 387 #endif 388 380 389 #if ENABLE(FILE_SYSTEM) 381 390 void WorkerContext::webkitRequestFileSystem(int type, long long size, PassRefPtr<FileSystemCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) -
trunk/Source/WebCore/workers/WorkerContext.h
r106912 r106914 132 132 virtual bool isJSExecutionForbidden() const; 133 133 134 #if ENABLE(BLOB) 135 DOMURL* webkitURL() const; 136 #endif 137 134 138 #if ENABLE(FILE_SYSTEM) 135 139 enum FileSystemType { -
trunk/Source/WebCore/workers/WorkerContext.idl
r106912 r106914 102 102 #endif 103 103 104 attribute [Conditional=BLOB] DOMURLConstructorwebkitURL;104 readonly attribute [Conditional=BLOB] DOMURL webkitURL; 105 105 106 106 #if defined(ENABLE_FILE_SYSTEM) && ENABLE_FILE_SYSTEM
Note: See TracChangeset
for help on using the changeset viewer.