| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |