| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 23 matching lines...) Expand all Loading... |
| 34 #include <v8.h> | 34 #include <v8.h> |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 #define V8_HIDDEN_PROPERTIES(V) \ | 38 #define V8_HIDDEN_PROPERTIES(V) \ |
| 39 V(attributeListener) \ | 39 V(attributeListener) \ |
| 40 V(callback) \ | 40 V(callback) \ |
| 41 V(detail) \ | 41 V(detail) \ |
| 42 V(document) \ | 42 V(document) \ |
| 43 V(event) \ | 43 V(event) \ |
| 44 V(constructor) \ |
| 44 V(listener) \ | 45 V(listener) \ |
| 45 V(scriptState) \ | 46 V(scriptState) \ |
| 46 V(sleepFunction) \ | 47 V(sleepFunction) \ |
| 47 V(state) \ | 48 V(state) \ |
| 48 V(adaptorFunctionPeer) \ | 49 V(adaptorFunctionPeer) \ |
| 49 V(toStringString) \ | 50 V(toStringString) \ |
| 50 V(typedArrayHiddenCopyMethod) | 51 V(typedArrayHiddenCopyMethod) |
| 51 | 52 |
| 52 class V8HiddenPropertyName { | 53 class V8HiddenPropertyName { |
| 53 public: | 54 public: |
| 54 V8HiddenPropertyName() { } | 55 V8HiddenPropertyName() { } |
| 55 #define V8_DECLARE_PROPERTY(name) static v8::Handle<v8::String> name(); | 56 #define V8_DECLARE_PROPERTY(name) static v8::Handle<v8::String> name(); |
| 56 V8_HIDDEN_PROPERTIES(V8_DECLARE_PROPERTY); | 57 V8_HIDDEN_PROPERTIES(V8_DECLARE_PROPERTY); |
| 57 #undef V8_DECLARE_PROPERTY | 58 #undef V8_DECLARE_PROPERTY |
| 58 | 59 |
| 59 static void setNamedHiddenReference(v8::Handle<v8::Object> parent, const cha
r* name, v8::Handle<v8::Value> child); | 60 static void setNamedHiddenReference(v8::Handle<v8::Object> parent, const cha
r* name, v8::Handle<v8::Value> child); |
| 60 | 61 |
| 61 private: | 62 private: |
| 62 static void createString(const char* key, v8::Persistent<v8::String>* handle
); | 63 static void createString(const char* key, v8::Persistent<v8::String>* handle
); |
| 63 #define V8_DECLARE_FIELD(name) v8::Persistent<v8::String> m_##name; | 64 #define V8_DECLARE_FIELD(name) v8::Persistent<v8::String> m_##name; |
| 64 V8_HIDDEN_PROPERTIES(V8_DECLARE_FIELD); | 65 V8_HIDDEN_PROPERTIES(V8_DECLARE_FIELD); |
| 65 #undef V8_DECLARE_FIELD | 66 #undef V8_DECLARE_FIELD |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 } | 69 } |
| 69 | 70 |
| 70 #endif // V8HiddenPropertyName_h | 71 #endif // V8HiddenPropertyName_h |
| OLD | NEW |