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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // object, and then simply Clone that object each time we need a new one. | 75 // object, and then simply Clone that object each time we need a new one. |
76 // This is faster than going through the full object creation process. | 76 // This is faster than going through the full object creation process. |
77 v8::Local<v8::Object> createWrapperFromCache(const WrapperTypeInfo* type) | 77 v8::Local<v8::Object> createWrapperFromCache(const WrapperTypeInfo* type) |
78 { | 78 { |
79 v8::Local<v8::Object> boilerplate = m_wrapperBoilerplates.Get(type); | 79 v8::Local<v8::Object> boilerplate = m_wrapperBoilerplates.Get(type); |
80 return !boilerplate.IsEmpty() ? boilerplate->Clone() : createWrapperFrom
CacheSlowCase(type); | 80 return !boilerplate.IsEmpty() ? boilerplate->Clone() : createWrapperFrom
CacheSlowCase(type); |
81 } | 81 } |
82 | 82 |
83 v8::Local<v8::Function> constructorForType(const WrapperTypeInfo* type) | 83 v8::Local<v8::Function> constructorForType(const WrapperTypeInfo* type) |
84 { | 84 { |
85 v8::Local<v8::Function> function = m_constructorMap.Get(type); | 85 v8::Local<v8::Function> interfaceObject = m_constructorMap.Get(type); |
86 return (!function.IsEmpty()) ? function : constructorForTypeSlowCase(typ
e); | 86 return (!interfaceObject.IsEmpty()) ? interfaceObject : constructorForTy
peSlowCase(type); |
87 } | 87 } |
88 | 88 |
89 v8::Local<v8::Object> prototypeForType(const WrapperTypeInfo*); | 89 v8::Local<v8::Object> prototypeForType(const WrapperTypeInfo*); |
90 | 90 |
91 V8NPObjectMap* v8NPObjectMap() { return &m_v8NPObjectMap; } | 91 V8NPObjectMap* v8NPObjectMap() { return &m_v8NPObjectMap; } |
92 | 92 |
93 void addCustomElementBinding(CustomElementDefinition*, PassOwnPtr<CustomElem
entBinding>); | 93 void addCustomElementBinding(CustomElementDefinition*, PassOwnPtr<CustomElem
entBinding>); |
94 | 94 |
95 V8DOMActivityLogger* activityLogger() const { return m_activityLogger; } | 95 V8DOMActivityLogger* activityLogger() const { return m_activityLogger; } |
96 void setActivityLogger(V8DOMActivityLogger* activityLogger) { m_activityLogg
er = activityLogger; } | 96 void setActivityLogger(V8DOMActivityLogger* activityLogger) { m_activityLogg
er = activityLogger; } |
(...skipping 29 matching lines...) Expand all Loading... |
126 | 126 |
127 // This is owned by a static hash map in V8DOMActivityLogger. | 127 // This is owned by a static hash map in V8DOMActivityLogger. |
128 V8DOMActivityLogger* m_activityLogger; | 128 V8DOMActivityLogger* m_activityLogger; |
129 | 129 |
130 V8GlobalValueMap<String, v8::Value, v8::kNotWeak> m_compiledPrivateScript; | 130 V8GlobalValueMap<String, v8::Value, v8::kNotWeak> m_compiledPrivateScript; |
131 }; | 131 }; |
132 | 132 |
133 } // namespace blink | 133 } // namespace blink |
134 | 134 |
135 #endif // V8PerContextData_h | 135 #endif // V8PerContextData_h |
OLD | NEW |