OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 23 matching lines...) Expand all Loading... | |
34 #include "bindings/v8/ScriptWrappable.h" | 34 #include "bindings/v8/ScriptWrappable.h" |
35 #include "core/dom/ContextLifecycleObserver.h" | 35 #include "core/dom/ContextLifecycleObserver.h" |
36 #include "wtf/PassRefPtr.h" | 36 #include "wtf/PassRefPtr.h" |
37 #include "wtf/RefCounted.h" | 37 #include "wtf/RefCounted.h" |
38 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 class ExecutionContext; | 42 class ExecutionContext; |
43 | 43 |
44 class WorkerPerformance : public ScriptWrappable, public RefCounted<WorkerPerfor mance> { | 44 class WorkerPerformance : public ScriptWrappable, public RefCountedWillBeGarbage CollectedFinalized<WorkerPerformance> { |
haraken
2014/02/07 05:49:46
Mads: It's a shame that we have to use GarbageColl
haraken
2014/02/07 05:56:50
Also I noticed that RefCountedWillBeGarbageCollect
zerny-chromium
2014/02/07 05:58:04
I'll let Mads answer that, but on the branch we ac
tkent
2014/02/07 06:07:55
I didn't know this rule. Do we have a documentati
Mads Ager (chromium)
2014/02/07 09:28:34
That is indeed a shame. We should see if we can co
| |
45 DECLARE_GC_INFO; | |
45 public: | 46 public: |
46 static PassRefPtr<WorkerPerformance> create() { return adoptRef(new WorkerPe rformance()); } | 47 static PassRefPtrWillBeRawPtr<WorkerPerformance> create() { return adoptRefW illBeNoop(new WorkerPerformance()); } |
47 ~WorkerPerformance(); | 48 ~WorkerPerformance(); |
48 | 49 |
49 double now(ExecutionContext*) const; | 50 double now(ExecutionContext*) const; |
50 | 51 |
52 void trace(Visitor*) { } | |
53 | |
51 private: | 54 private: |
52 WorkerPerformance(); | 55 WorkerPerformance(); |
53 }; | 56 }; |
54 | 57 |
55 } | 58 } |
56 | 59 |
57 #endif // WorkerPerformance_h | 60 #endif // WorkerPerformance_h |
OLD | NEW |