| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 kV8PrototypeTypeIndex, const_cast<WrapperTypeInfo*>(type)); | 129 kV8PrototypeTypeIndex, const_cast<WrapperTypeInfo*>(type)); |
| 130 } | 130 } |
| 131 type->PreparePrototypeAndInterfaceObject(current_context, world, | 131 type->PreparePrototypeAndInterfaceObject(current_context, world, |
| 132 prototype_object, interface_object, | 132 prototype_object, interface_object, |
| 133 interface_template); | 133 interface_template); |
| 134 } | 134 } |
| 135 | 135 |
| 136 // Origin Trials | 136 // Origin Trials |
| 137 InstallConditionalFeatures(type, ScriptState::From(current_context), | 137 InstallConditionalFeatures(type, ScriptState::From(current_context), |
| 138 prototype_object, interface_object); | 138 prototype_object, interface_object); |
| 139 | |
| 140 constructor_map_.Set(type, interface_object); | 139 constructor_map_.Set(type, interface_object); |
| 141 | |
| 142 return interface_object; | 140 return interface_object; |
| 143 } | 141 } |
| 144 | 142 |
| 145 v8::Local<v8::Object> V8PerContextData::PrototypeForType( | 143 v8::Local<v8::Object> V8PerContextData::PrototypeForType( |
| 146 const WrapperTypeInfo* type) { | 144 const WrapperTypeInfo* type) { |
| 147 v8::Local<v8::Object> constructor = ConstructorForType(type); | 145 v8::Local<v8::Object> constructor = ConstructorForType(type); |
| 148 if (constructor.IsEmpty()) | 146 if (constructor.IsEmpty()) |
| 149 return v8::Local<v8::Object>(); | 147 return v8::Local<v8::Object>(); |
| 150 v8::Local<v8::Value> prototype_value; | 148 v8::Local<v8::Value> prototype_value; |
| 151 if (!constructor->Get(GetContext(), V8String(isolate_, "prototype")) | 149 if (!constructor->Get(GetContext(), V8String(isolate_, "prototype")) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 180 | 178 |
| 181 void V8PerContextData::ClearData(const char* key) { | 179 void V8PerContextData::ClearData(const char* key) { |
| 182 data_map_.erase(key); | 180 data_map_.erase(key); |
| 183 } | 181 } |
| 184 | 182 |
| 185 V8PerContextData::Data* V8PerContextData::GetData(const char* key) { | 183 V8PerContextData::Data* V8PerContextData::GetData(const char* key) { |
| 186 return data_map_.at(key); | 184 return data_map_.at(key); |
| 187 } | 185 } |
| 188 | 186 |
| 189 } // namespace blink | 187 } // namespace blink |
| OLD | NEW |