Web Inspector: Script Profiler: Make profiler output typed.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jan 2013 16:15:38 +0000 (16:15 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jan 2013 16:15:38 +0000 (16:15 +0000)
commit0efe0e35daf22d3d4330f44c5ec6bc7e6be1b148
tree3b6e799775f3574f83db3e481b61ad317882178a
parentce601999dc1e0128eb54ded58f9f0e26a2e15b40
Web Inspector: Script Profiler: Make profiler output typed.
https://bugs.webkit.org/show_bug.cgi?id=102792

Patch by Eugene Klyuchnikov <eustas@chromium.org> on 2013-01-30
Reviewed by Yury Semikhatsky.

Currently fields "head" and "bottomUpHead" of Profile object
returned by Profiler.getCPUProfile is untyped (type = object).

That's not good both for client side (protocol users may
only guess on output content) and backend side (field names
are hardcoded in source code).

This patch defines "head" and "bottomUpHead" to be of new
"CPUProfileNode" type and updates serialization code to use
builders to create output.

* bindings/js/ScriptProfile.cpp: Used buiders for serialization.
* bindings/js/ScriptProfile.h: Ditto.
* bindings/v8/ScriptProfile.cpp: Ditto.
* bindings/v8/ScriptProfile.h: Ditto.
* inspector/Inspector.json: Added and used new ProfileNode type.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/ScriptProfile.cpp
Source/WebCore/bindings/js/ScriptProfile.h
Source/WebCore/bindings/v8/ScriptProfile.cpp
Source/WebCore/bindings/v8/ScriptProfile.h
Source/WebCore/inspector/Inspector.json