This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chakrashim,test: stub out serdes classes
* Added stub shims for SharedArrayBuffer, ValueSerializer, and ValueDeserializer * Disabled failing serdes tests * Updated v8-version.h to match V8's version PR-URL: #206 Reviewed-By: Kunal Pathak <[email protected]>
- Loading branch information
Showing
7 changed files
with
297 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright Microsoft. All rights reserved. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files(the "Software"), to | ||
// deal in the Software without restriction, including without limitation the | ||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and / or | ||
// sell copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions : | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
// IN THE SOFTWARE. | ||
|
||
#include "v8chakra.h" | ||
|
||
namespace v8 { | ||
|
||
SharedArrayBuffer* SharedArrayBuffer::Cast(Value* obj) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return nullptr; | ||
} | ||
|
||
} // namespace v8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// Copyright Microsoft. All rights reserved. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files(the "Software"), to | ||
// deal in the Software without restriction, including without limitation the | ||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and / or | ||
// sell copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions : | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
// IN THE SOFTWARE. | ||
|
||
#include "v8chakra.h" | ||
|
||
namespace v8 { | ||
|
||
MaybeLocal<Object> ValueDeserializer::Delegate::ReadHostObject( | ||
Isolate* isolate) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return Local<Object>(); | ||
} | ||
|
||
ValueDeserializer::ValueDeserializer(Isolate* isolate, const uint8_t* data, | ||
size_t size, Delegate* delegate) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
ValueDeserializer::~ValueDeserializer() { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
Maybe<bool> ValueDeserializer::ReadHeader(Local<Context> context) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return Nothing<bool>(); | ||
} | ||
|
||
MaybeLocal<Value> ValueDeserializer::ReadValue(Local<Context> context) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return Local<Value>(); | ||
} | ||
|
||
|
||
void ValueDeserializer::TransferArrayBuffer(uint32_t transfer_id, | ||
Local<ArrayBuffer> array_buffer) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
void ValueDeserializer::TransferSharedArrayBuffer( | ||
uint32_t id, Local<SharedArrayBuffer> shared_array_buffer) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
uint32_t ValueDeserializer::GetWireFormatVersion() const { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return 0; | ||
} | ||
|
||
bool ValueDeserializer::ReadUint32(uint32_t* value) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return false; | ||
} | ||
|
||
bool ValueDeserializer::ReadUint64(uint64_t* value) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return false; | ||
} | ||
|
||
bool ValueDeserializer::ReadDouble(double* value) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return false; | ||
} | ||
|
||
bool ValueDeserializer::ReadRawBytes(size_t length, const void** data) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return false; | ||
} | ||
|
||
} // namespace v8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
// Copyright Microsoft. All rights reserved. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files(the "Software"), to | ||
// deal in the Software without restriction, including without limitation the | ||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and / or | ||
// sell copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions : | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
// IN THE SOFTWARE. | ||
|
||
#include "v8chakra.h" | ||
|
||
namespace v8 { | ||
|
||
Maybe<bool> ValueSerializer::Delegate::WriteHostObject(Isolate* isolate, | ||
Local<Object> object) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return Nothing<bool>(); | ||
} | ||
|
||
Maybe<uint32_t> ValueSerializer::Delegate::GetSharedArrayBufferId( | ||
Isolate* isolate, Local<SharedArrayBuffer> shared_array_buffer) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return Nothing<unsigned int>(); | ||
} | ||
|
||
void* ValueSerializer::Delegate::ReallocateBufferMemory(void* old_buffer, | ||
size_t size, | ||
size_t* actual_size) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return nullptr; | ||
} | ||
|
||
void ValueSerializer::Delegate::FreeBufferMemory(void* buffer) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
ValueSerializer::ValueSerializer(Isolate* isolate) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
ValueSerializer::ValueSerializer(Isolate* isolate, Delegate* delegate) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
ValueSerializer::~ValueSerializer() { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
void ValueSerializer::WriteHeader() { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
Maybe<bool> ValueSerializer::WriteValue(Local<Context> context, | ||
Local<Value> value) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return Nothing<bool>(); | ||
} | ||
|
||
std::pair<uint8_t*, size_t> ValueSerializer::Release() { | ||
CHAKRA_UNIMPLEMENTED(); | ||
return std::pair<uint8_t*, size_t>(); | ||
} | ||
|
||
void ValueSerializer::TransferArrayBuffer(uint32_t transfer_id, | ||
Local<ArrayBuffer> array_buffer) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
void ValueSerializer::SetTreatArrayBufferViewsAsHostObjects(bool mode) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
void ValueSerializer::WriteUint32(uint32_t value) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
void ValueSerializer::WriteUint64(uint64_t value) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
void ValueSerializer::WriteDouble(double value) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
void ValueSerializer::WriteRawBytes(const void* source, size_t length) { | ||
CHAKRA_UNIMPLEMENTED(); | ||
} | ||
|
||
} // namespace v8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters