Commit 1d57e6a5 authored by Alberto Garcia's avatar Alberto Garcia
Browse files

Imported Upstream version 2.3.5

parent a6b3459e
2014-01-29 Csaba Osztrogonác <ossy@webkit.org>
Remove ENABLE(JAVASCRIPT_DEBUGGER) leftovers
https://bugs.webkit.org/show_bug.cgi?id=127845
Reviewed by Joseph Pecoraro.
* Source/autotools/SetupWebKitFeatures.m4:
2014-01-29 Csaba Osztrogonác <ossy@webkit.org>
Remove ENABLE(JAVASCRIPT_DEBUGGER) guards
https://bugs.webkit.org/show_bug.cgi?id=127840
Reviewed by Mark Lam.
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:
2014-01-25 Darin Adler <darin@apple.com>
Get rid of ICU_UNICODE and WCHAR_UNICODE remnants
https://bugs.webkit.org/show_bug.cgi?id=127623
Reviewed by Anders Carlsson.
* Source/cmake/OptionsEfl.cmake: Removed ICU_UNICODE and WCHAR_UNICODE flags.
* Source/cmake/OptionsGTK.cmake: Ditto.
* Source/cmake/OptionsWinCE.cmake: Ditto.
2014-01-23 Max Vujovic <mvujovic@adobe.com>
Remove CSS Custom Filters code and tests
https://bugs.webkit.org/show_bug.cgi?id=127382
Reviewed by Simon Fraser.
* Source/autotools/FindDependencies.m4:
* Source/autotools/SetupWebKitFeatures.m4:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:
2014-01-22 Martin Robinson <mrobinson@igalia.com>
[GTK][CMake] Add support for building the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=127195
Reviewed by Daniel Bates.
* Source/cmake/OptionsGTK.cmake: Turn on the network process and give it
a name like the WebProcess.
2014-01-20 Ryuan Choi <ryuan.choi@samsung.com>
[CMAKE] Remove Nix from CMake scripts
https://bugs.webkit.org/show_bug.cgi?id=127264
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* Source/CMakeLists.txt:
* Source/cmake/FindEGL.cmake:
* Source/cmake/OptionsCommon.cmake:
2014-01-18 Anders Carlsson <andersca@apple.com>
Remove ENABLE_THREADED_HTML_PARSER defines everywhere
https://bugs.webkit.org/show_bug.cgi?id=127225
Reviewed by Andreas Kling.
This concludes the removal of over 8.8 million lines of threaded parser code.
* Source/autotools/SetupWebKitFeatures.m4:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:
2014-01-18 Lauro Neto <lauro.neto@openbossa.org>
Remove Nix files from WebCore
https://bugs.webkit.org/show_bug.cgi?id=127176
Reviewed by Anders Carlsson.
* Source/cmake/OptionsNix.cmake: Removed.
2014-01-18 Zan Dobersek <zdobersek@igalia.com>
[GTK] Bump the minimum required Clang version to 3.3
https://bugs.webkit.org/show_bug.cgi?id=127178
Reviewed by Martin Robinson.
* Source/autotools/CheckSystemAndBasicDependencies.m4: Require Clang 3.3 or later when using the Clang compiler to
build the GTK port. Building with Clang 3.2 doesn't work anymore and there's no point in fixing that, as we should
support the latest two versions of Clang (3.3 and 3.4), just like we do with GCC (4.7 and 4.8).
2014-01-14 Dan Bernstein <mitz@apple.com>
Only use color in make output when it’s going to a terminal.
Reviewed by Mark Rowe.
* Makefile.shared:
2014-01-13 Martin Robinson <mrobinson@igalia.com>
[CMake] Mark all dependency include paths and libraries as advanced variables
https://bugs.webkit.org/show_bug.cgi?id=126504
Reviewed by Daniel Bates.
* Source/cmake/FindATK.cmake: Mark result variable as advanced.
* Source/cmake/FindCairo.cmake: Ditto.
* Source/cmake/FindEGL.cmake: Ditto.
* Source/cmake/FindEnchant.cmake: Ditto.
* Source/cmake/FindGLIB.cmake: Ditto.
* Source/cmake/FindGStreamer.cmake: Ditto.
* Source/cmake/FindHarfBuzz.cmake: Ditto.
* Source/cmake/FindLibSoup.cmake: Ditto.
2014-01-13 Martin Robinson <mrobinson@igalia.com>
[GTK][CMake] Add a 'check' target
https://bugs.webkit.org/show_bug.cgi?id=126770
Reviewed by Daniel Bates.
* Source/PlatformGTK.cmake: Add a 'check' target that calls run-gtk-tests.
2014-01-13 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update NEWS and Versions.m4 for 2.3.4 release.
* Source/autotools/Versions.m4: Bump version numbers.
2014-01-12 Sergio Correia <sergio.correia@openbossa.org>
[EFL][WK2] Make API tests work again
......
......@@ -17,15 +17,11 @@
namespace Inspector {
#if ENABLE(JAVASCRIPT_DEBUGGER)
InspectorDebuggerBackendDispatcherHandler::~InspectorDebuggerBackendDispatcherHandler() { }
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
InspectorInspectorBackendDispatcherHandler::~InspectorInspectorBackendDispatcherHandler() { }
InspectorRuntimeBackendDispatcherHandler::~InspectorRuntimeBackendDispatcherHandler() { }
#if ENABLE(JAVASCRIPT_DEBUGGER)
PassRefPtr<InspectorDebuggerBackendDispatcher> InspectorDebuggerBackendDispatcher::create(InspectorBackendDispatcher* backendDispatcher, InspectorDebuggerBackendDispatcherHandler* agent)
{
return adoptRef(new InspectorDebuggerBackendDispatcher(backendDispatcher, agent));
......@@ -146,11 +142,13 @@ void InspectorDebuggerBackendDispatcher::setBreakpointByUrl(long callId, const I
RefPtr<InspectorObject> result = InspectorObject::create();
Inspector::TypeBuilder::Debugger::BreakpointId out_breakpointId;
RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::Location> > out_locations;
m_agent->setBreakpointByUrl(&error, in_lineNumber, url_valueFound ? &in_url : nullptr, urlRegex_valueFound ? &in_urlRegex : nullptr, columnNumber_valueFound ? &in_columnNumber : nullptr, options_valueFound ? &in_options : nullptr, &out_breakpointId, out_locations);
RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier> > out_breakpointActionIdentifiers;
m_agent->setBreakpointByUrl(&error, in_lineNumber, url_valueFound ? &in_url : nullptr, urlRegex_valueFound ? &in_urlRegex : nullptr, columnNumber_valueFound ? &in_columnNumber : nullptr, options_valueFound ? &in_options : nullptr, &out_breakpointId, out_locations, out_breakpointActionIdentifiers);
if (!error.length()) {
result->setString(ASCIILiteral("breakpointId"), out_breakpointId);
result->setValue(ASCIILiteral("locations"), out_locations);
result->setValue(ASCIILiteral("breakpointActionIdentifiers"), out_breakpointActionIdentifiers);
}
m_backendDispatcher->sendResponse(callId, result.release(), error);
......@@ -175,11 +173,13 @@ void InspectorDebuggerBackendDispatcher::setBreakpoint(long callId, const Inspec
RefPtr<InspectorObject> result = InspectorObject::create();
Inspector::TypeBuilder::Debugger::BreakpointId out_breakpointId;
RefPtr<Inspector::TypeBuilder::Debugger::Location> out_actualLocation;
m_agent->setBreakpoint(&error, in_location, options_valueFound ? &in_options : nullptr, &out_breakpointId, out_actualLocation);
RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier> > out_breakpointActionIdentifiers;
m_agent->setBreakpoint(&error, in_location, options_valueFound ? &in_options : nullptr, &out_breakpointId, out_actualLocation, out_breakpointActionIdentifiers);
if (!error.length()) {
result->setString(ASCIILiteral("breakpointId"), out_breakpointId);
result->setValue(ASCIILiteral("actualLocation"), out_actualLocation);
result->setValue(ASCIILiteral("breakpointActionIdentifiers"), out_breakpointActionIdentifiers);
}
m_backendDispatcher->sendResponse(callId, result.release(), error);
......@@ -427,8 +427,6 @@ void InspectorDebuggerBackendDispatcher::setOverlayMessage(long callId, const In
m_backendDispatcher->sendResponse(callId, result.release(), error);
}
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
PassRefPtr<InspectorInspectorBackendDispatcher> InspectorInspectorBackendDispatcher::create(InspectorBackendDispatcher* backendDispatcher, InspectorInspectorBackendDispatcherHandler* agent)
{
return adoptRef(new InspectorInspectorBackendDispatcher(backendDispatcher, agent));
......
......@@ -16,14 +16,13 @@ namespace Inspector {
typedef String ErrorString;
#if ENABLE(JAVASCRIPT_DEBUGGER)
class JS_EXPORT_PRIVATE InspectorDebuggerBackendDispatcherHandler {
public:
virtual void enable(ErrorString*) = 0;
virtual void disable(ErrorString*) = 0;
virtual void setBreakpointsActive(ErrorString*, bool in_active) = 0;
virtual void setBreakpointByUrl(ErrorString*, int in_lineNumber, const String* in_url, const String* in_urlRegex, const int* in_columnNumber, const RefPtr<Inspector::InspectorObject>* in_options, Inspector::TypeBuilder::Debugger::BreakpointId* out_breakpointId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::Location> >& out_locations) = 0;
virtual void setBreakpoint(ErrorString*, const RefPtr<Inspector::InspectorObject>& in_location, const RefPtr<Inspector::InspectorObject>* in_options, Inspector::TypeBuilder::Debugger::BreakpointId* out_breakpointId, RefPtr<Inspector::TypeBuilder::Debugger::Location>& out_actualLocation) = 0;
virtual void setBreakpointByUrl(ErrorString*, int in_lineNumber, const String* in_url, const String* in_urlRegex, const int* in_columnNumber, const RefPtr<Inspector::InspectorObject>* in_options, Inspector::TypeBuilder::Debugger::BreakpointId* out_breakpointId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::Location> >& out_locations, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier> >& out_breakpointActionIdentifiers) = 0;
virtual void setBreakpoint(ErrorString*, const RefPtr<Inspector::InspectorObject>& in_location, const RefPtr<Inspector::InspectorObject>* in_options, Inspector::TypeBuilder::Debugger::BreakpointId* out_breakpointId, RefPtr<Inspector::TypeBuilder::Debugger::Location>& out_actualLocation, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier> >& out_breakpointActionIdentifiers) = 0;
virtual void removeBreakpoint(ErrorString*, const String& in_breakpointId) = 0;
virtual void continueToLocation(ErrorString*, const RefPtr<Inspector::InspectorObject>& in_location) = 0;
virtual void stepOver(ErrorString*) = 0;
......@@ -41,7 +40,6 @@ protected:
virtual ~InspectorDebuggerBackendDispatcherHandler();
};
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
class JS_EXPORT_PRIVATE InspectorInspectorBackendDispatcherHandler {
public:
virtual void enable(ErrorString*) = 0;
......@@ -67,11 +65,10 @@ protected:
#if ENABLE(JAVASCRIPT_DEBUGGER)
class JS_EXPORT_PRIVATE InspectorDebuggerBackendDispatcher FINAL : public Inspector::InspectorSupplementalBackendDispatcher {
class JS_EXPORT_PRIVATE InspectorDebuggerBackendDispatcher final : public Inspector::InspectorSupplementalBackendDispatcher {
public:
static PassRefPtr<InspectorDebuggerBackendDispatcher> create(Inspector::InspectorBackendDispatcher*, InspectorDebuggerBackendDispatcherHandler*);
virtual void dispatch(long callId, const String& method, PassRefPtr<Inspector::InspectorObject> message) OVERRIDE;
virtual void dispatch(long callId, const String& method, PassRefPtr<Inspector::InspectorObject> message) override;
private:
void enable(long callId, const Inspector::InspectorObject& message);
void disable(long callId, const Inspector::InspectorObject& message);
......@@ -96,11 +93,10 @@ private:
InspectorDebuggerBackendDispatcherHandler* m_agent;
};
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
class JS_EXPORT_PRIVATE InspectorInspectorBackendDispatcher FINAL : public Inspector::InspectorSupplementalBackendDispatcher {
class JS_EXPORT_PRIVATE InspectorInspectorBackendDispatcher final : public Inspector::InspectorSupplementalBackendDispatcher {
public:
static PassRefPtr<InspectorInspectorBackendDispatcher> create(Inspector::InspectorBackendDispatcher*, InspectorInspectorBackendDispatcherHandler*);
virtual void dispatch(long callId, const String& method, PassRefPtr<Inspector::InspectorObject> message) OVERRIDE;
virtual void dispatch(long callId, const String& method, PassRefPtr<Inspector::InspectorObject> message) override;
private:
void enable(long callId, const Inspector::InspectorObject& message);
void disable(long callId, const Inspector::InspectorObject& message);
......@@ -109,10 +105,10 @@ private:
InspectorInspectorBackendDispatcherHandler* m_agent;
};
class JS_EXPORT_PRIVATE InspectorRuntimeBackendDispatcher FINAL : public Inspector::InspectorSupplementalBackendDispatcher {
class JS_EXPORT_PRIVATE InspectorRuntimeBackendDispatcher final : public Inspector::InspectorSupplementalBackendDispatcher {
public:
static PassRefPtr<InspectorRuntimeBackendDispatcher> create(Inspector::InspectorBackendDispatcher*, InspectorRuntimeBackendDispatcherHandler*);
virtual void dispatch(long callId, const String& method, PassRefPtr<Inspector::InspectorObject> message) OVERRIDE;
virtual void dispatch(long callId, const String& method, PassRefPtr<Inspector::InspectorObject> message) override;
private:
void parse(long callId, const Inspector::InspectorObject& message);
void evaluate(long callId, const Inspector::InspectorObject& message);
......
......@@ -16,8 +16,6 @@
namespace Inspector {
#if ENABLE(JAVASCRIPT_DEBUGGER)
void InspectorDebuggerFrontendDispatcher::globalObjectCleared()
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
......@@ -97,7 +95,16 @@ void InspectorDebuggerFrontendDispatcher::resumed()
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
void InspectorDebuggerFrontendDispatcher::didSampleProbe(PassRefPtr<Inspector::TypeBuilder::Debugger::ProbeSample> sample)
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Debugger.didSampleProbe"));
RefPtr<InspectorObject> paramsObject = InspectorObject::create();
paramsObject->setValue(ASCIILiteral("sample"), sample);
jsonMessage->setObject(ASCIILiteral("params"), paramsObject);
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
void InspectorInspectorFrontendDispatcher::evaluateForTestInFrontend(int testCallId, const String& script)
{
......
......@@ -17,7 +17,6 @@ namespace Inspector {
#if ENABLE(INSPECTOR)
#if ENABLE(JAVASCRIPT_DEBUGGER)
class JS_EXPORT_PRIVATE InspectorDebuggerFrontendDispatcher {
public:
InspectorDebuggerFrontendDispatcher(InspectorFrontendChannel* inspectorFrontendChannel) : m_inspectorFrontendChannel(inspectorFrontendChannel) { }
......@@ -28,22 +27,22 @@ public:
// Named after parameter 'reason' while generating command/event paused.
struct Reason {
enum Enum {
XHR = 23,
DOM = 24,
EventListener = 25,
Exception = 26,
Assert = 27,
CSPViolation = 28,
Other = 29,
XHR = 24,
DOM = 25,
EventListener = 26,
Exception = 27,
Assert = 28,
CSPViolation = 29,
Other = 30,
};
}; // struct Reason
void paused(PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::CallFrame> > callFrames, Reason::Enum reason, PassRefPtr<Inspector::InspectorObject> data);
void resumed();
void didSampleProbe(PassRefPtr<Inspector::TypeBuilder::Debugger::ProbeSample> sample);
private:
InspectorFrontendChannel* m_inspectorFrontendChannel;
};
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
class JS_EXPORT_PRIVATE InspectorInspectorFrontendDispatcher {
public:
InspectorInspectorFrontendDispatcher(InspectorFrontendChannel* inspectorFrontendChannel) : m_inspectorFrontendChannel(inspectorFrontendChannel) { }
......
......@@ -21,6 +21,7 @@ static const char* const enum_constant_values[] = {
"log",
"evaluate",
"sound",
"probe",
"global",
"local",
"with",
......@@ -60,7 +61,6 @@ String getJSEnumConstantValue(int code) {
#if !ASSERT_DISABLED
#if ENABLE(JAVASCRIPT_DEBUGGER)
void Inspector::TypeBuilder::Debugger::Location::assertCorrectValue(Inspector::InspectorValue* value)
{
RefPtr<InspectorObject> object;
......@@ -90,10 +90,8 @@ void Inspector::TypeBuilder::Debugger::Location::assertCorrectValue(Inspector::I
if (foundPropertiesCount != object->size())
FATAL("Unexpected properties in object: %s\n", object->toJSONString().ascii().data());
}
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
#if ENABLE(JAVASCRIPT_DEBUGGER)
void Inspector::TypeBuilder::Debugger::FunctionDetails::assertCorrectValue(Inspector::InspectorValue* value)
{
RefPtr<InspectorObject> object;
......@@ -141,10 +139,8 @@ void Inspector::TypeBuilder::Debugger::FunctionDetails::assertCorrectValue(Inspe
if (foundPropertiesCount != object->size())
FATAL("Unexpected properties in object: %s\n", object->toJSONString().ascii().data());
}
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
#if ENABLE(JAVASCRIPT_DEBUGGER)
void Inspector::TypeBuilder::Debugger::CallFrame::assertCorrectValue(Inspector::InspectorValue* value)
{
RefPtr<InspectorObject> object;
......@@ -184,10 +180,8 @@ void Inspector::TypeBuilder::Debugger::CallFrame::assertCorrectValue(Inspector::
if (foundPropertiesCount != object->size())
FATAL("Unexpected properties in object: %s\n", object->toJSONString().ascii().data());
}
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
#if ENABLE(JAVASCRIPT_DEBUGGER)
void Inspector::TypeBuilder::Debugger::Scope::Type::assertCorrectValue(Inspector::InspectorValue* value)
{
WTF::String s;
......@@ -195,10 +189,8 @@ void Inspector::TypeBuilder::Debugger::Scope::Type::assertCorrectValue(Inspector
ASSERT(cast_res);
ASSERT(s == "global" || s == "local" || s == "with" || s == "closure" || s == "catch");
}
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
#if ENABLE(JAVASCRIPT_DEBUGGER)
void Inspector::TypeBuilder::Debugger::Scope::assertCorrectValue(Inspector::InspectorValue* value)
{
RefPtr<InspectorObject> object;
......@@ -220,7 +212,6 @@ void Inspector::TypeBuilder::Debugger::Scope::assertCorrectValue(Inspector::Insp
if (foundPropertiesCount != object->size())
FATAL("Unexpected properties in object: %s\n", object->toJSONString().ascii().data());
}
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
void Inspector::TypeBuilder::Runtime::RemoteObject::Type::assertCorrectValue(Inspector::InspectorValue* value)
......
......@@ -20,12 +20,10 @@ namespace Inspector {
namespace TypeBuilder {
// Forward declarations.
#if ENABLE(JAVASCRIPT_DEBUGGER)
namespace Debugger {
class Scope;
} // Debugger
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
namespace Runtime {
class RemoteObject;
class ObjectPreview;
......@@ -35,11 +33,13 @@ class PropertyPreview;
// End of forward declarations.
// Typedefs.
#if ENABLE(JAVASCRIPT_DEBUGGER)
namespace Debugger {
/* Breakpoint identifier. */
typedef String BreakpointId;
/* Breakpoint action identifier. */
typedef int BreakpointActionIdentifier;
/* Unique script identifier. */
typedef String ScriptId;
......@@ -48,11 +48,13 @@ typedef String CallFrameId;
} // Debugger
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
namespace Runtime {
/* Unique object identifier. */
typedef String RemoteObjectId;
/* Id of an execution context. */
typedef int ExecutionContextId;
/* Unique frame identifier. FIXME: Duplicate of Network.FrameId <https://webkit.org/b/125664> Web Inspector: FIX Type Dependency Issues */
typedef String RuntimeFrameId;
......@@ -64,7 +66,6 @@ typedef String RuntimeFrameId;
JS_EXPORT_PRIVATE String getJSEnumConstantValue(int code);
#if ENABLE(JAVASCRIPT_DEBUGGER)
namespace Debugger {
/* Location in the source code. */
class Location : public Inspector::InspectorObjectBase {
......@@ -151,6 +152,7 @@ public:
Log = 0,
Evaluate = 1,
Sound = 2,
Probe = 3,
};
}; // struct Type
enum {
......@@ -489,11 +491,11 @@ public:
// Named after property name 'type' while generating Scope.
struct Type {
enum Enum {
Global = 3,
Local = 4,
With = 5,
Closure = 6,
Catch = 7,
Global = 4,
Local = 5,
With = 6,
Closure = 7,
Catch = 8,
};
#if !ASSERT_DISABLED
static void assertCorrectValue(Inspector::InspectorValue* value);
......@@ -567,9 +569,103 @@ public:
#endif // !ASSERT_DISABLED
};
/* A sample collected by evaluating a probe breakpoint action. */
class ProbeSample : public Inspector::InspectorObjectBase {
public:
enum {
NoFieldsSet = 0,
ProbeIdSet = 1 << 0,
SampleIdSet = 1 << 1,
BatchIdSet = 1 << 2,
TimestampSet = 1 << 3,
PayloadSet = 1 << 4,
AllFieldsSet = (ProbeIdSet | SampleIdSet | BatchIdSet | TimestampSet | PayloadSet)
};
template<int STATE>
class Builder {
private:
RefPtr<Inspector::InspectorObject> m_result;
template<int STEP> Builder<STATE | STEP>& castState()
{
return *reinterpret_cast<Builder<STATE | STEP>*>(this);
}
Builder(PassRefPtr</*ProbeSample*/Inspector::InspectorObject> ptr)
{
COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
m_result = ptr;
}
friend class ProbeSample;
public:
Builder<STATE | ProbeIdSet>& setProbeId(int value)
{
COMPILE_ASSERT(!(STATE & ProbeIdSet), property_probeId_already_set);
m_result->setNumber(ASCIILiteral("probeId"), value);
return castState<ProbeIdSet>();
}
Builder<STATE | SampleIdSet>& setSampleId(int value)
{
COMPILE_ASSERT(!(STATE & SampleIdSet), property_sampleId_already_set);
m_result->setNumber(ASCIILiteral("sampleId"), value);
return castState<SampleIdSet>();
}
Builder<STATE | BatchIdSet>& setBatchId(int value)
{
COMPILE_ASSERT(!(STATE & BatchIdSet), property_batchId_already_set);
m_result->setNumber(ASCIILiteral("batchId"), value);
return castState<BatchIdSet>();
}
Builder<STATE | TimestampSet>& setTimestamp(double value)
{
COMPILE_ASSERT(!(STATE & TimestampSet), property_timestamp_already_set);
m_result->setNumber(ASCIILiteral("timestamp"), value);
return castState<TimestampSet>();
}
Builder<STATE | PayloadSet>& setPayload(PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> value)
{
COMPILE_ASSERT(!(STATE & PayloadSet), property_payload_already_set);
m_result->setValue(ASCIILiteral("payload"), value);
return castState<PayloadSet>();
}
operator RefPtr<ProbeSample>& ()
{
COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
COMPILE_ASSERT(sizeof(ProbeSample) == sizeof(Inspector::InspectorObject), cannot_cast);
return *reinterpret_cast<RefPtr<ProbeSample>*>(&m_result);
}
PassRefPtr<ProbeSample> release()
{
return RefPtr<ProbeSample>(*this).release();
}
};
/*
* Synthetic constructor:
* RefPtr<ProbeSample> result = ProbeSample::create()
* .setProbeId(...)
* .setSampleId(...)
* .setBatchId(...)
* .setTimestamp(...)
* .setPayload(...);
*/
static Builder<NoFieldsSet> create()
{
return Builder<NoFieldsSet>(Inspector::InspectorObject::create());
}
typedef Inspector::TypeBuilder::StructItemTraits ItemTraits;
};
} // Debugger
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
namespace GenericTypes {
/* Search match in a resource. */
class SearchMatch : public Inspector::InspectorObjectBase {
......@@ -648,12 +744,12 @@ public:
// Named after property name 'type' while generating RemoteObject.
struct Type {
enum Enum {
Object = 8,
Function = 9,
Undefined = 10,
String = 11,
Number = 12,
Boolean = 13,
Object = 9,
Function = 10,
Undefined = 11,
String = 12,
Number = 13,
Boolean = 14,
};
#if !ASSERT_DISABLED
static void assertCorrectValue(Inspector::InspectorValue* value);
......@@ -662,11 +758,11 @@ public:
// Named after property name 'subtype' while generating RemoteObject.
struct Subtype {
enum Enum {
Array = 14,
Null = 15,
Node = 16,
Regexp = 17,
Date = 18,