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

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

Issue 147333004: Revert of Limit the usage of SharedPersistent to ScriptValue only (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/bindings.gypi ('k') | Source/bindings/v8/ScriptController.h » ('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) 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 { 69 {
70 m_handle.Reset(isolate, handle); 70 m_handle.Reset(isolate, handle);
71 } 71 }
72 72
73 // Note: This is clear in the OwnPtr sense, not the v8::Handle sense. 73 // Note: This is clear in the OwnPtr sense, not the v8::Handle sense.
74 void clear() 74 void clear()
75 { 75 {
76 m_handle.Reset(); 76 m_handle.Reset();
77 } 77 }
78 78
79 bool operator==(const ScopedPersistent<T>& other) const 79 bool operator==(const ScopedPersistent<T>& other)
80 { 80 {
81 return m_handle == other.m_handle; 81 return m_handle == other.m_handle;
82 } 82 }
83 83
84 private: 84 private:
85 // FIXME: This function does an unsafe handle access. Remove it. 85 // FIXME: This function does an unsafe handle access. Remove it.
86 friend class V8AbstractEventListener; 86 friend class V8AbstractEventListener;
87 friend class V8PerIsolateData; 87 friend class V8PerIsolateData;
88 ALWAYS_INLINE v8::Persistent<T>& getUnsafe() 88 ALWAYS_INLINE v8::Persistent<T>& getUnsafe()
89 { 89 {
90 return m_handle; 90 return m_handle;
91 } 91 }
92 92
93 v8::Persistent<T> m_handle; 93 v8::Persistent<T> m_handle;
94 }; 94 };
95 95
96 } // namespace WebCore 96 } // namespace WebCore
97 97
98 #endif // ScopedPersistent_h 98 #endif // ScopedPersistent_h
OLDNEW
« no previous file with comments | « Source/bindings/bindings.gypi ('k') | Source/bindings/v8/ScriptController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698