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

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

Issue 1215813003: Correctly track lifetime of promise rejection events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 5 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/core/v8/ScriptPromise.h ('k') | Source/bindings/core/v8/SharedPersistent.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) 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 v8::Local<v8::Value> v8Value() const; 172 v8::Local<v8::Value> v8Value() const;
173 // TODO(bashi): Remove v8ValueUnsafe(). 173 // TODO(bashi): Remove v8ValueUnsafe().
174 v8::Local<v8::Value> v8ValueUnsafe() const; 174 v8::Local<v8::Value> v8ValueUnsafe() const;
175 // Returns v8Value() if a given ScriptState is the same as the 175 // Returns v8Value() if a given ScriptState is the same as the
176 // ScriptState which is associated with this ScriptValue. Otherwise 176 // ScriptState which is associated with this ScriptValue. Otherwise
177 // this "clones" the v8 value and returns it. 177 // this "clones" the v8 value and returns it.
178 v8::Local<v8::Value> v8ValueFor(ScriptState*); 178 v8::Local<v8::Value> v8ValueFor(ScriptState*);
179 179
180 bool toString(String&) const; 180 bool toString(String&) const;
181 181
182 void setReference(const v8::Persistent<v8::Object>& parent, v8::Isolate* iso late)
183 {
184 m_value->setReference(parent, isolate);
185 }
186
182 static ScriptValue createNull(ScriptState*); 187 static ScriptValue createNull(ScriptState*);
183 188
184 private: 189 private:
185 RefPtr<ScriptState> m_scriptState; 190 RefPtr<ScriptState> m_scriptState;
186 RefPtr<SharedPersistent<v8::Value>> m_value; 191 RefPtr<SharedPersistent<v8::Value>> m_value;
187 }; 192 };
188 193
189 } // namespace blink 194 } // namespace blink
190 195
191 #endif // ScriptValue_h 196 #endif // ScriptValue_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ScriptPromise.h ('k') | Source/bindings/core/v8/SharedPersistent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698