| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 value = v8::Integer::New(isolate, constant.ivalue); | 121 value = v8::Integer::New(isolate, constant.ivalue); |
| 122 break; | 122 break; |
| 123 case V8DOMConfiguration::ConstantTypeUnsignedLong: | 123 case V8DOMConfiguration::ConstantTypeUnsignedLong: |
| 124 value = v8::Integer::NewFromUnsigned(isolate, constant.ivalue); | 124 value = v8::Integer::NewFromUnsigned(isolate, constant.ivalue); |
| 125 break; | 125 break; |
| 126 case V8DOMConfiguration::ConstantTypeFloat: | 126 case V8DOMConfiguration::ConstantTypeFloat: |
| 127 case V8DOMConfiguration::ConstantTypeDouble: | 127 case V8DOMConfiguration::ConstantTypeDouble: |
| 128 value = v8::Number::New(isolate, constant.dvalue); | 128 value = v8::Number::New(isolate, constant.dvalue); |
| 129 break; | 129 break; |
| 130 case V8DOMConfiguration::ConstantTypeString: | 130 case V8DOMConfiguration::ConstantTypeString: |
| 131 value = v8::String::NewFromUtf8(isolate, constant.svalue); | 131 value = v8NormalString(isolate, constant.svalue); |
| 132 break; | 132 break; |
| 133 default: | 133 default: |
| 134 ASSERT_NOT_REACHED(); | 134 ASSERT_NOT_REACHED(); |
| 135 } | 135 } |
| 136 functionDescriptor->Set(constantName, value, attributes); | 136 functionDescriptor->Set(constantName, value, attributes); |
| 137 prototypeTemplate->Set(constantName, value, attributes); | 137 prototypeTemplate->Set(constantName, value, attributes); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void doInstallMethodInternal(v8::Local<v8::ObjectTemplate> target, v8::Local<v8:
:Name> name, v8::Local<v8::FunctionTemplate> functionTemplate, v8::PropertyAttri
bute attribute) | 140 void doInstallMethodInternal(v8::Local<v8::ObjectTemplate> target, v8::Local<v8:
:Name> name, v8::Local<v8::FunctionTemplate> functionTemplate, v8::PropertyAttri
bute attribute) |
| 141 { | 141 { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 return result; | 279 return result; |
| 280 | 280 |
| 281 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); | 281 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); |
| 282 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); | 282 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); |
| 283 configureDOMClassTemplate(result, isolate); | 283 configureDOMClassTemplate(result, isolate); |
| 284 data->setDOMTemplate(wrapperTypeInfo, result); | 284 data->setDOMTemplate(wrapperTypeInfo, result); |
| 285 return result; | 285 return result; |
| 286 } | 286 } |
| 287 | 287 |
| 288 } // namespace blink | 288 } // namespace blink |
| OLD | NEW |