Changeset 106914 in webkit


Ignore:
Timestamp:
Feb 7, 2012 1:44:25 AM (12 years ago)
Author:
haraken@chromium.org
Message:

Unreviewed, rolling out r106912.
http://trac.webkit.org/changeset/106912
https://bugs.webkit.org/show_bug.cgi?id=77947

"AppleWebKit build is broken" (Requested by haraken on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-02-07

Source/WebCore:

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::~ScriptExecutionContext):
(WebCore):

  • dom/ScriptExecutionContext.h:

(WebCore):
(ScriptExecutionContext):

  • html/DOMURL.cpp:

(WebCore::DOMURL::DOMURL):
(WebCore):
(WebCore::DOMURL::~DOMURL):
(WebCore::DOMURL::contextDestroyed):
(WebCore::DOMURL::createObjectURL):
(WebCore::DOMURL::revokeObjectURL):

  • html/DOMURL.h:

(WebCore::DOMURL::create):
(DOMURL):

  • html/DOMURL.idl:
  • html/PublicURLManager.h: Removed.
  • page/DOMWindow.cpp:

(WebCore):
(WebCore::DOMWindow::webkitURL):

  • page/DOMWindow.h:

(DOMWindow):

  • page/DOMWindow.idl:
  • workers/WorkerContext.cpp:

(WebCore):
(WebCore::WorkerContext::webkitURL):

  • workers/WorkerContext.h:

(WorkerContext):

  • workers/WorkerContext.idl:

LayoutTests:

  • fast/dom/DOMURL/check-instanceof-domurl-functions-expected.txt: Removed.
  • fast/dom/DOMURL/check-instanceof-domurl-functions.html: Removed.
Location:
trunk
Files:
3 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106912 r106914  
     12012-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
    1132012-02-07  Kaustubh Atrawalkar  <kaustubh@motorola.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r106913 r106914  
     12012-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
    1412012-02-07  Kentaro Hara  <haraken@chromium.org>
    242
  • trunk/Source/WebCore/dom/ScriptExecutionContext.cpp

    r106912 r106914  
    3939#include "FileThread.h"
    4040#include "MessagePort.h"
    41 #include "PublicURLManager.h"
    4241#include "ScriptCallStack.h"
    4342#include "SecurityOrigin.h"
     
    127126        m_fileThread = 0;
    128127    }
    129 #endif
    130 #if ENABLE(BLOB)
    131     if (m_publicURLManager)
    132         m_publicURLManager->contextDestroyed();
    133128#endif
    134129}
     
    391386#endif
    392387
    393 #if ENABLE(BLOB)
    394 PublicURLManager& ScriptExecutionContext::publicURLManager()
    395 {
    396     if (!m_publicURLManager)
    397         m_publicURLManager = PublicURLManager::create();
    398     return *m_publicURLManager;
    399 }
    400 #endif
    401 
    402388void ScriptExecutionContext::adjustMinimumTimerInterval(double oldMinimumTimerInterval)
    403389{
  • trunk/Source/WebCore/dom/ScriptExecutionContext.h

    r106912 r106914  
    3131#include "ConsoleTypes.h"
    3232#include "KURL.h"
    33 #include "PublicURLManager.h"
    3433#include "ScriptCallStack.h"
    3534#include "SecurityContext.h"
     
    5554class MessagePort;
    5655
    57 #if ENABLE(BLOB)
    58 class PublicURLManager;
    59 #endif
    6056#if ENABLE(SQL_DATABASE)
    6157class Database;
     
    108104    virtual void stopActiveDOMObjects();
    109105
    110 #if ENABLE(BLOB)
    111     PublicURLManager& publicURLManager();
    112 #endif
    113106    void didCreateActiveDOMObject(ActiveDOMObject*, void* upcastPointer);
    114107    void willDestroyActiveDOMObject(ActiveDOMObject*);
     
    213206    class PendingException;
    214207    OwnPtr<Vector<OwnPtr<PendingException> > > m_pendingExceptions;
    215 #if ENABLE(BLOB)
    216     OwnPtr<PublicURLManager> m_publicURLManager;
    217 #endif
    218208
    219209#if ENABLE(SQL_DATABASE)
  • trunk/Source/WebCore/html/DOMURL.cpp

    r106912 r106914  
    11/*
    22 * Copyright (C) 2011 Google Inc. All rights reserved.
    3  * Copyright (C) 2012 Motorola Mobility Inc.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    3130#include "DOMURL.h"
    3231
    33 #include "ActiveDOMObject.h"
    3432#include "Blob.h"
    3533#include "BlobURL.h"
    3634#include "KURL.h"
    37 #include "PublicURLManager.h"
    3835#include "ScriptExecutionContext.h"
    39 #include "SecurityOrigin.h"
    4036#include "ThreadableBlobRegistry.h"
    41 #include <wtf/PassOwnPtr.h>
    4237#include <wtf/MainThread.h>
    4338
     
    4944namespace WebCore {
    5045
     46DOMURL::DOMURL(ScriptExecutionContext* scriptExecutionContext)
     47    : ContextDestructionObserver(scriptExecutionContext)
     48{
     49}
     50
     51DOMURL::~DOMURL()
     52{
     53}
     54
     55void 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
    5163#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)
     71String DOMURL::createObjectURL(MediaStream* stream)
    5372{
    54     if (!scriptExecutionContext || !stream)
     73    if (!m_scriptExecutionContext || !stream)
    5574        return String();
    5675
    57     KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext->securityOrigin());
     76    KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext()->securityOrigin());
    5877    if (publicURL.isEmpty())
    5978        return String();
     
    6382
    6483    MediaStreamRegistry::registry().registerMediaStreamURL(publicURL, stream);
    65     scriptExecutionContext->publicURLManager().streamURLs().add(publicURL.string());
     84    m_publicStreamURLs.add(publicURL.string());
    6685
    6786    return publicURL.string();
     
    6988#endif
    7089
    71 String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, Blob* blob)
     90String DOMURL::createObjectURL(Blob* blob)
    7291{
    73     if (!scriptExecutionContext || !blob)
     92    if (!m_scriptExecutionContext || !blob)
    7493        return String();
    7594
    76     KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext->securityOrigin());
     95    KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext()->securityOrigin());
    7796    if (publicURL.isEmpty())
    7897        return String();
    7998
    8099    ThreadableBlobRegistry::registerBlobURL(publicURL, blob->url());
    81     scriptExecutionContext->publicURLManager().blobURLs().add(publicURL.string());
     100    m_publicBlobURLs.add(publicURL.string());
    82101
    83102    return publicURL.string();
    84103}
    85104
    86 void DOMURL::revokeObjectURL(ScriptExecutionContext* scriptExecutionContext, const String& urlString)
     105void DOMURL::revokeObjectURL(const String& urlString)
    87106{
    88     if (!scriptExecutionContext)
     107    if (!m_scriptExecutionContext)
    89108        return;
    90109
    91110    KURL url(KURL(), urlString);
    92111
    93     HashSet<String>& blobURLs = scriptExecutionContext->publicURLManager().blobURLs();
    94     if (blobURLs.contains(url.string())) {
     112    if (m_publicBlobURLs.contains(url.string())) {
    95113        ThreadableBlobRegistry::unregisterBlobURL(url);
    96         blobURLs.remove(url.string());
     114        m_publicBlobURLs.remove(url.string());
    97115    }
    98116
    99117#if ENABLE(MEDIA_STREAM)
    100     HashSet<String>& streamURLs = scriptExecutionContext->publicURLManager().streamURLs();
    101     if (streamURLs.contains(url.string())) {
     118    if (m_publicStreamURLs.contains(url.string())) {
    102119        // FIXME: make sure of this assertion below. Raise a spec question if required.
    103120        // Since WebWorkers cannot obtain Stream objects, we should be on the main thread.
    104121        ASSERT(isMainThread());
    105122        MediaStreamRegistry::registry().unregisterMediaStreamURL(url);
    106         streamURLs.remove(url.string());
     123        m_publicStreamURLs.remove(url.string());
    107124    }
    108125#endif
  • trunk/Source/WebCore/html/DOMURL.h

    r106912 r106914  
    11/*
    22 * Copyright (C) 2011 Google Inc. All rights reserved.
    3  * Copyright (C) 2012 Motorola Mobility Inc.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    2827#define DOMURL_h
    2928
    30 #include "KURL.h"
     29#if ENABLE(BLOB)
     30
     31#include "ActiveDOMObject.h"
    3132#include "PlatformString.h"
    3233#include <wtf/HashSet.h>
     
    4041class ScriptExecutionContext;
    4142
    42 class DOMURL : public RefCounted<DOMURL> {
     43class DOMURL : public RefCounted<DOMURL>, public ContextDestructionObserver {
     44public:
     45    static PassRefPtr<DOMURL> create(ScriptExecutionContext* scriptExecutionContext) { return adoptRef(new DOMURL(scriptExecutionContext)); }
     46    ~DOMURL();
    4347
    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&);
    4653
    47 #if ENABLE(BLOB)
    48     static void contextDestroyed(ScriptExecutionContext*);
     54private:
     55    explicit DOMURL(ScriptExecutionContext*);
    4956
    50     static String createObjectURL(ScriptExecutionContext*, Blob*);
    51     static void revokeObjectURL(ScriptExecutionContext*, const String&);
     57    virtual void contextDestroyed();
     58
     59    HashSet<String> m_publicBlobURLs;
    5260#if ENABLE(MEDIA_STREAM)
    53     static String createObjectURL(ScriptExecutionContext*, MediaStream*);
    54 #endif
     61    HashSet<String> m_publicStreamURLs;
    5562#endif
    5663};
     
    5865} // namespace WebCore
    5966
     67#endif // ENABLE(BLOB)
     68
    6069#endif // DOMURL_h
  • trunk/Source/WebCore/html/DOMURL.idl

    r106912 r106914  
    11/*
    22 * Copyright (C) 2011 Google Inc. All rights reserved.
    3  * Copyright (C) 2012 Motorola Mobility Inc.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    2827    interface [
    2928        Conditional=BLOB,
    30         Constructor,
     29        OmitConstructor,
    3130        GenerateNativeConverter,
    3231        JSGenerateToJS,
     
    3433    ] DOMURL {
    3534#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);
    3736#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);
    4039    };
    4140}
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r106912 r106914  
    18981898}
    18991899
     1900#if ENABLE(BLOB)
     1901DOMURL* 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
    19001909#if ENABLE(QUOTA)
    19011910StorageInfo* DOMWindow::webkitStorageInfo() const
  • trunk/Source/WebCore/page/DOMWindow.h

    r106912 r106914  
    352352        using RefCounted<DOMWindow>::deref;
    353353
     354#if ENABLE(BLOB)
     355        DOMURL* webkitURL() const;
     356#endif
     357
    354358#if ENABLE(DEVICE_ORIENTATION)
    355359        DEFINE_ATTRIBUTE_EVENT_LISTENER(devicemotion);
  • trunk/Source/WebCore/page/DOMWindow.idl

    r106912 r106914  
    783783        attribute [Conditional=BLOB] WebKitBlobBuilderConstructor WebKitBlobBuilder;
    784784
    785         attribute [Conditional=BLOB] DOMURLConstructor webkitURL;
     785        readonly attribute [Conditional=BLOB] DOMURL webkitURL;
    786786
    787787#if defined(ENABLE_QUOTA) && ENABLE_QUOTA
  • trunk/Source/WebCore/workers/WorkerContext.cpp

    r106912 r106914  
    378378}
    379379
     380#if ENABLE(BLOB)
     381DOMURL* WorkerContext::webkitURL() const
     382{
     383    if (!m_domURL)
     384        m_domURL = DOMURL::create(this->scriptExecutionContext());
     385    return m_domURL.get();
     386}
     387#endif
     388
    380389#if ENABLE(FILE_SYSTEM)
    381390void WorkerContext::webkitRequestFileSystem(int type, long long size, PassRefPtr<FileSystemCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
  • trunk/Source/WebCore/workers/WorkerContext.h

    r106912 r106914  
    132132        virtual bool isJSExecutionForbidden() const;
    133133
     134#if ENABLE(BLOB)
     135        DOMURL* webkitURL() const;
     136#endif
     137
    134138#if ENABLE(FILE_SYSTEM)
    135139        enum FileSystemType {
  • trunk/Source/WebCore/workers/WorkerContext.idl

    r106912 r106914  
    102102#endif
    103103
    104         attribute [Conditional=BLOB] DOMURLConstructor webkitURL;
     104        readonly attribute [Conditional=BLOB] DOMURL webkitURL;
    105105
    106106#if defined(ENABLE_FILE_SYSTEM) && ENABLE_FILE_SYSTEM
Note: See TracChangeset for help on using the changeset viewer.