| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 v8::Isolate* isolate, | 585 v8::Isolate* isolate, |
| 586 const DOMWrapperWorld& world, | 586 const DOMWrapperWorld& world, |
| 587 WrapperTypeInfo* wrapperTypeInfo, | 587 WrapperTypeInfo* wrapperTypeInfo, |
| 588 InstallTemplateFunction configureDOMClassTemplate) { | 588 InstallTemplateFunction configureDOMClassTemplate) { |
| 589 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 589 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 590 v8::Local<v8::FunctionTemplate> result = | 590 v8::Local<v8::FunctionTemplate> result = |
| 591 data->findInterfaceTemplate(world, wrapperTypeInfo); | 591 data->findInterfaceTemplate(world, wrapperTypeInfo); |
| 592 if (!result.IsEmpty()) | 592 if (!result.IsEmpty()) |
| 593 return result; | 593 return result; |
| 594 | 594 |
| 595 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); | |
| 596 result = v8::FunctionTemplate::New( | 595 result = v8::FunctionTemplate::New( |
| 597 isolate, V8ObjectConstructor::isValidConstructorMode); | 596 isolate, V8ObjectConstructor::isValidConstructorMode); |
| 598 configureDOMClassTemplate(isolate, world, result); | 597 configureDOMClassTemplate(isolate, world, result); |
| 599 data->setInterfaceTemplate(world, wrapperTypeInfo, result); | 598 data->setInterfaceTemplate(world, wrapperTypeInfo, result); |
| 600 return result; | 599 return result; |
| 601 } | 600 } |
| 602 | 601 |
| 603 void V8DOMConfiguration::setClassString( | 602 void V8DOMConfiguration::setClassString( |
| 604 v8::Isolate* isolate, | 603 v8::Isolate* isolate, |
| 605 v8::Local<v8::ObjectTemplate> objectTemplate, | 604 v8::Local<v8::ObjectTemplate> objectTemplate, |
| 606 const char* classString) { | 605 const char* classString) { |
| 607 objectTemplate->Set( | 606 objectTemplate->Set( |
| 608 v8::Symbol::GetToStringTag(isolate), v8AtomicString(isolate, classString), | 607 v8::Symbol::GetToStringTag(isolate), v8AtomicString(isolate, classString), |
| 609 static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum)); | 608 static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontEnum)); |
| 610 } | 609 } |
| 611 | 610 |
| 612 } // namespace blink | 611 } // namespace blink |
| OLD | NEW |