OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 using TypeBuilder::Timeline::TimelineEvent; | 45 using TypeBuilder::Timeline::TimelineEvent; |
46 | 46 |
47 PassRefPtr<TimelineEvent> TimelineRecordFactory::createGenericRecord(double star
tTime, int maxCallStackDepth, const String& type, PassRefPtr<JSONObject> data) | 47 PassRefPtr<TimelineEvent> TimelineRecordFactory::createGenericRecord(double star
tTime, int maxCallStackDepth, const String& type, PassRefPtr<JSONObject> data) |
48 { | 48 { |
49 ASSERT(data.get()); | 49 ASSERT(data.get()); |
50 RefPtr<TimelineEvent> record = TimelineEvent::create() | 50 RefPtr<TimelineEvent> record = TimelineEvent::create() |
51 .setType(type) | 51 .setType(type) |
52 .setData(data) | 52 .setData(data) |
53 .setStartTime(startTime); | 53 .setStartTime(startTime); |
54 if (maxCallStackDepth) { | 54 if (maxCallStackDepth) { |
55 RefPtr<ScriptCallStack> stackTrace = createScriptCallStack(maxCallStackD
epth, true); | 55 RefPtrWillBeRawPtr<ScriptCallStack> stackTrace = createScriptCallStack(m
axCallStackDepth, true); |
56 if (stackTrace && stackTrace->size()) | 56 if (stackTrace && stackTrace->size()) |
57 record->setStackTrace(stackTrace->buildInspectorArray()); | 57 record->setStackTrace(stackTrace->buildInspectorArray()); |
58 } | 58 } |
59 return record.release(); | 59 return record.release(); |
60 } | 60 } |
61 | 61 |
62 PassRefPtr<TimelineEvent> TimelineRecordFactory::createBackgroundRecord(double s
tartTime, const String& threadName, const String& type, PassRefPtr<JSONObject> d
ata) | 62 PassRefPtr<TimelineEvent> TimelineRecordFactory::createBackgroundRecord(double s
tartTime, const String& threadName, const String& type, PassRefPtr<JSONObject> d
ata) |
63 { | 63 { |
64 ASSERT(data.get()); | 64 ASSERT(data.get()); |
65 RefPtr<TimelineEvent> record = TimelineEvent::create() | 65 RefPtr<TimelineEvent> record = TimelineEvent::create() |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 | 318 |
319 String TimelineRecordFactory::type(TypeBuilder::Timeline::TimelineEvent* event) | 319 String TimelineRecordFactory::type(TypeBuilder::Timeline::TimelineEvent* event) |
320 { | 320 { |
321 String type; | 321 String type; |
322 event->type(&type); | 322 event->type(&type); |
323 return type; | 323 return type; |
324 } | 324 } |
325 | 325 |
326 } // namespace WebCore | 326 } // namespace WebCore |
327 | 327 |
OLD | NEW |