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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptValue.h

Issue 2675943003: Remove custom left overs from object grouping (Closed)
Patch Set: Rebase (0 changes) Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 void clear() { m_value = nullptr; } 157 void clear() { m_value = nullptr; }
158 158
159 v8::Local<v8::Value> v8Value() const; 159 v8::Local<v8::Value> v8Value() const;
160 // Returns v8Value() if a given ScriptState is the same as the 160 // Returns v8Value() if a given ScriptState is the same as the
161 // ScriptState which is associated with this ScriptValue. Otherwise 161 // ScriptState which is associated with this ScriptValue. Otherwise
162 // this "clones" the v8 value and returns it. 162 // this "clones" the v8 value and returns it.
163 v8::Local<v8::Value> v8ValueFor(ScriptState*) const; 163 v8::Local<v8::Value> v8ValueFor(ScriptState*) const;
164 164
165 bool toString(String&) const; 165 bool toString(String&) const;
166 166
167 void setReference(const v8::Persistent<v8::Object>& parent,
168 v8::Isolate* isolate) {
169 m_value->setReference(parent, isolate);
170 }
171
172 static ScriptValue createNull(ScriptState*); 167 static ScriptValue createNull(ScriptState*);
173 168
174 private: 169 private:
175 RefPtr<ScriptState> m_scriptState; 170 RefPtr<ScriptState> m_scriptState;
176 RefPtr<SharedPersistent<v8::Value>> m_value; 171 RefPtr<SharedPersistent<v8::Value>> m_value;
177 }; 172 };
178 173
179 } // namespace blink 174 } // namespace blink
180 175
181 #endif // ScriptValue_h 176 #endif // ScriptValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698