| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 5312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5323 while (string[length] != '\0') | 5323 while (string[length] != '\0') |
| 5324 length++; | 5324 length++; |
| 5325 return length; | 5325 return length; |
| 5326 } | 5326 } |
| 5327 | 5327 |
| 5328 | 5328 |
| 5329 MUST_USE_RESULT | 5329 MUST_USE_RESULT |
| 5330 inline i::MaybeHandle<i::String> NewString(i::Factory* factory, | 5330 inline i::MaybeHandle<i::String> NewString(i::Factory* factory, |
| 5331 String::NewStringType type, | 5331 String::NewStringType type, |
| 5332 i::Vector<const char> string) { | 5332 i::Vector<const char> string) { |
| 5333 if (type ==String::kInternalizedString) { | 5333 if (type == String::kInternalizedString) { |
| 5334 return factory->InternalizeUtf8String(string); | 5334 return factory->InternalizeUtf8String(string); |
| 5335 } | 5335 } |
| 5336 return factory->NewStringFromUtf8(string); | 5336 return factory->NewStringFromUtf8(string); |
| 5337 } | 5337 } |
| 5338 | 5338 |
| 5339 | 5339 |
| 5340 MUST_USE_RESULT | 5340 MUST_USE_RESULT |
| 5341 inline i::MaybeHandle<i::String> NewString(i::Factory* factory, | 5341 inline i::MaybeHandle<i::String> NewString(i::Factory* factory, |
| 5342 String::NewStringType type, | 5342 String::NewStringType type, |
| 5343 i::Vector<const uint8_t> string) { | 5343 i::Vector<const uint8_t> string) { |
| (...skipping 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7614 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7614 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7615 Address callback_address = | 7615 Address callback_address = |
| 7616 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7616 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7617 VMState<EXTERNAL> state(isolate); | 7617 VMState<EXTERNAL> state(isolate); |
| 7618 ExternalCallbackScope call_scope(isolate, callback_address); | 7618 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7619 callback(info); | 7619 callback(info); |
| 7620 } | 7620 } |
| 7621 | 7621 |
| 7622 | 7622 |
| 7623 } } // namespace v8::internal | 7623 } } // namespace v8::internal |
| OLD | NEW |