Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: Source/bindings/v8/ScriptWrappable.h

Issue 23444025: Remove calls to to-be-deprecated Persistent functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/DOMWrapperMap.h ('k') | Source/bindings/v8/V8GCController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 void setWrapper(v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, const WrapperConfiguration& configuration) 64 void setWrapper(v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, const WrapperConfiguration& configuration)
65 { 65 {
66 ASSERT(!containsWrapper()); 66 ASSERT(!containsWrapper());
67 if (!*wrapper) { 67 if (!*wrapper) {
68 m_wrapperOrTypeInfo = 0; 68 m_wrapperOrTypeInfo = 0;
69 return; 69 return;
70 } 70 }
71 v8::Persistent<v8::Object> persistent(isolate, wrapper); 71 v8::Persistent<v8::Object> persistent(isolate, wrapper);
72 configuration.configureWrapper(&persistent, isolate); 72 configuration.configureWrapper(&persistent);
73 persistent.MakeWeak(this, &makeWeakCallback); 73 persistent.MakeWeak(this, &makeWeakCallback);
74 m_wrapperOrTypeInfo = reinterpret_cast<uintptr_t>(persistent.ClearAndLea k()) | 1; 74 m_wrapperOrTypeInfo = reinterpret_cast<uintptr_t>(persistent.ClearAndLea k()) | 1;
75 ASSERT(containsWrapper()); 75 ASSERT(containsWrapper());
76 } 76 }
77 77
78 v8::Local<v8::Object> newLocalWrapper(v8::Isolate* isolate) const 78 v8::Local<v8::Object> newLocalWrapper(v8::Isolate* isolate) const
79 { 79 {
80 return unsafePersistent().newLocal(isolate); 80 return unsafePersistent().newLocal(isolate);
81 } 81 }
82 82
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // FIXME: I noticed that 50%~ of minor GC cycle times can be consumed 201 // FIXME: I noticed that 50%~ of minor GC cycle times can be consumed
202 // inside key->deref(), which causes Node destructions. We should 202 // inside key->deref(), which causes Node destructions. We should
203 // make Node destructions incremental. 203 // make Node destructions incremental.
204 info->derefObject(object); 204 info->derefObject(object);
205 } 205 }
206 }; 206 };
207 207
208 } // namespace WebCore 208 } // namespace WebCore
209 209
210 #endif // ScriptWrappable_h 210 #endif // ScriptWrappable_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/DOMWrapperMap.h ('k') | Source/bindings/v8/V8GCController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698