Changeset 113318 in webkit


Ignore:
Timestamp:
Apr 5, 2012 6:25:04 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: CodeGeneratorInspector.py: switch FileSystem, Profiler and Worker domains to typed API
https://bugs.webkit.org/show_bug.cgi?id=83069

Patch by Peter Rybin <peter.rybin@gmail.com> on 2012-04-05
Reviewed by Yury Semikhatsky.

Domains are switched to 'strict' mode. However, hardly any changes were needed in C++ code because
only basic types are currently used in Inspector.json.

  • inspector/CodeGeneratorInspector.py:
  • inspector/InspectorProfilerAgent.cpp:

(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore):
(WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):

  • inspector/InspectorProfilerAgent.h:

(InspectorProfilerAgent):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r113317 r113318  
     12012-04-05  Peter Rybin  <peter.rybin@gmail.com>
     2
     3        Web Inspector: CodeGeneratorInspector.py: switch FileSystem, Profiler and Worker domains to typed API
     4        https://bugs.webkit.org/show_bug.cgi?id=83069
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        Domains are switched to 'strict' mode. However, hardly any changes were needed in C++ code because
     9        only basic types are currently used in Inspector.json.
     10
     11        * inspector/CodeGeneratorInspector.py:
     12        * inspector/InspectorProfilerAgent.cpp:
     13        (WebCore::InspectorProfilerAgent::getProfileHeaders):
     14        (WebCore):
     15        (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
     16        * inspector/InspectorProfilerAgent.h:
     17        (InspectorProfilerAgent):
     18
    1192012-04-05  Levi Weintraub  <leviw@chromium.org>
    220
  • trunk/Source/WebCore/inspector/CodeGeneratorInspector.py

    r113213 r113318  
    6363                          "CSS", "Debugger", "DOM", "Network", "Page", "Runtime",
    6464                          "Inspector", "Memory", "Database",
    65                           "IndexedDB", "DOMStorage", "ApplicationCache"]
     65                          "IndexedDB", "DOMStorage", "ApplicationCache",
     66                          "FileSystem", "Profiler", "Worker"]
    6667
    6768
     
    22902291};
    22912292
     2293template<>
     2294struct ArrayItemHelper<InspectorObject> {
     2295    struct Traits {
     2296        static void pushRefPtr(InspectorArray* array, PassRefPtr<InspectorObject> value)
     2297        {
     2298            array->pushObject(value);
     2299        }
     2300    };
     2301};
     2302
    22922303template<typename T>
    22932304struct ArrayItemHelper<TypeBuilder::Array<T> > {
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp

    r112996 r113318  
    241241}
    242242
    243 void InspectorProfilerAgent::getProfileHeaders(ErrorString*, RefPtr<InspectorArray>& headers)
    244 {
     243void InspectorProfilerAgent::getProfileHeaders(ErrorString*, RefPtr<TypeBuilder::Array<InspectorObject> >& headers)
     244{
     245    headers = TypeBuilder::Array<InspectorObject>::create();
     246
    245247    ProfilesMap::iterator profilesEnd = m_profiles.end();
    246248    for (ProfilesMap::iterator it = m_profiles.begin(); it != profilesEnd; ++it)
    247         headers->pushObject(createProfileHeader(*it->second));
     249        headers->addItem(createProfileHeader(*it->second));
    248250    HeapSnapshotsMap::iterator snapshotsEnd = m_snapshots.end();
    249251    for (HeapSnapshotsMap::iterator it = m_snapshots.begin(); it != snapshotsEnd; ++it)
    250         headers->pushObject(createSnapshotHeader(*it->second));
     252        headers->addItem(createSnapshotHeader(*it->second));
    251253}
    252254
     
    427429}
    428430
    429 void InspectorProfilerAgent::getObjectByHeapObjectId(ErrorString* error, int id, const String* objectGroup, RefPtr<InspectorObject>& result)
     431void InspectorProfilerAgent::getObjectByHeapObjectId(ErrorString* error, int id, const String* objectGroup, RefPtr<TypeBuilder::Runtime::RemoteObject>& result)
    430432{
    431433    ScriptObject heapObject = ScriptProfiler::objectByHeapObjectId(id);
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.h

    r109214 r113318  
    8686    bool enabled() { return m_enabled; }
    8787    String getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false);
    88     virtual void getProfileHeaders(ErrorString*, RefPtr<InspectorArray>& headers);
     88    virtual void getProfileHeaders(ErrorString*, RefPtr<TypeBuilder::Array<InspectorObject> >& headers);
    8989    virtual void getProfile(ErrorString*, const String& type, int uid, RefPtr<InspectorObject>& profileObject);
    9090    virtual void removeProfile(ErrorString*, const String& type, int uid);
     
    9797    void toggleRecordButton(bool isProfiling);
    9898
    99     virtual void getObjectByHeapObjectId(ErrorString*, int id, const String* objectGroup, RefPtr<InspectorObject>& result);
     99    virtual void getObjectByHeapObjectId(ErrorString*, int id, const String* objectGroup, RefPtr<TypeBuilder::Runtime::RemoteObject>& result);
    100100
    101101protected:
Note: See TracChangeset for help on using the changeset viewer.