Chromium Code Reviews| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 return !boilerplate.IsEmpty() ? boilerplate->Clone() | 78 return !boilerplate.IsEmpty() ? boilerplate->Clone() |
| 79 : createWrapperFromCacheSlowCase(type); | 79 : createWrapperFromCacheSlowCase(type); |
| 80 } | 80 } |
| 81 | 81 |
| 82 v8::Local<v8::Function> constructorForType(const WrapperTypeInfo* type) { | 82 v8::Local<v8::Function> constructorForType(const WrapperTypeInfo* type) { |
| 83 v8::Local<v8::Function> interfaceObject = m_constructorMap.Get(type); | 83 v8::Local<v8::Function> interfaceObject = m_constructorMap.Get(type); |
| 84 return (!interfaceObject.IsEmpty()) ? interfaceObject | 84 return (!interfaceObject.IsEmpty()) ? interfaceObject |
| 85 : constructorForTypeSlowCase(type); | 85 : constructorForTypeSlowCase(type); |
| 86 } | 86 } |
| 87 | 87 |
| 88 v8::Local<v8::Function> constructorForTypeFromCache( | |
|
iclelland
2017/01/20 14:31:19
I'd document the return value, mostly for the case
chasej
2017/01/25 19:58:20
Done.
| |
| 89 const WrapperTypeInfo* type) { | |
| 90 return m_constructorMap.Get(type); | |
| 91 } | |
| 92 | |
| 88 v8::Local<v8::Object> prototypeForType(const WrapperTypeInfo*); | 93 v8::Local<v8::Object> prototypeForType(const WrapperTypeInfo*); |
| 89 | 94 |
| 90 void addCustomElementBinding(std::unique_ptr<V0CustomElementBinding>); | 95 void addCustomElementBinding(std::unique_ptr<V0CustomElementBinding>); |
| 91 | 96 |
| 92 V8DOMActivityLogger* activityLogger() const { return m_activityLogger; } | 97 V8DOMActivityLogger* activityLogger() const { return m_activityLogger; } |
| 93 void setActivityLogger(V8DOMActivityLogger* activityLogger) { | 98 void setActivityLogger(V8DOMActivityLogger* activityLogger) { |
| 94 m_activityLogger = activityLogger; | 99 m_activityLogger = activityLogger; |
| 95 } | 100 } |
| 96 | 101 |
| 97 Modulator* modulator() const { return m_modulator.get(); } | 102 Modulator* modulator() const { return m_modulator.get(); } |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 127 | 132 |
| 128 // This is owned by a static hash map in V8DOMActivityLogger. | 133 // This is owned by a static hash map in V8DOMActivityLogger. |
| 129 V8DOMActivityLogger* m_activityLogger; | 134 V8DOMActivityLogger* m_activityLogger; |
| 130 | 135 |
| 131 Persistent<Modulator> m_modulator; | 136 Persistent<Modulator> m_modulator; |
| 132 }; | 137 }; |
| 133 | 138 |
| 134 } // namespace blink | 139 } // namespace blink |
| 135 | 140 |
| 136 #endif // V8PerContextData_h | 141 #endif // V8PerContextData_h |
| OLD | NEW |