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

Side by Side Diff: third_party/WebKit/WebCore/bindings/js/ScriptValue.h

Issue 46097: WebKit merge 41660:41709 (WebKit side).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 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 24 matching lines...) Expand all
35 #include "ScriptState.h" 35 #include "ScriptState.h"
36 #include <runtime/Protect.h> 36 #include <runtime/Protect.h>
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 class String; 40 class String;
41 41
42 class ScriptValue { 42 class ScriptValue {
43 public: 43 public:
44 ScriptValue(JSC::JSValuePtr value = JSC::noValue()) : m_value(value) {} 44 ScriptValue(JSC::JSValuePtr value = JSC::noValue()) : m_value(value) {}
45 virtual ~ScriptValue() {}
45 46
46 JSC::JSValuePtr jsValue() const { return m_value.get(); } 47 JSC::JSValuePtr jsValue() const { return m_value.get(); }
47 bool getString(String& result) const; 48 bool getString(String& result) const;
48 String toString(ScriptState* scriptState) const { return m_value.get().toStr ing(scriptState); } 49 String toString(ScriptState* scriptState) const { return m_value.get().toStr ing(scriptState); }
49 bool isNull() const; 50 bool isNull() const;
50 bool isUndefined() const; 51 bool isUndefined() const;
51 bool hasNoValue() const { return m_value == JSC::noValue(); } 52 bool hasNoValue() const { return m_value == JSC::noValue(); }
52 53
53 private: 54 private:
54 JSC::ProtectedJSValuePtr m_value; 55 JSC::ProtectedJSValuePtr m_value;
55 }; 56 };
56 57
57 } // namespace WebCore 58 } // namespace WebCore
58 59
59 #endif // ScriptValue_h 60 #endif // ScriptValue_h
60 61
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698