Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Update ChakraCore samples to latest JSRT #48

Merged
merged 1 commit into from
Nov 16, 2016
Merged

Update ChakraCore samples to latest JSRT #48

merged 1 commit into from
Nov 16, 2016

Conversation

obastemur
Copy link
Contributor

No description provided.

@obastemur
Copy link
Contributor Author

/cc @liminzhu

@obastemur
Copy link
Contributor Author

Fixes #47

@kphillisjr
Copy link

Thanks for the Quick fix on the bug, and the review involves compile bugs and notes involving Ubuntu Linux 16.04 LTS.

@liminzhu
Copy link
Member

@obastemur why only fail_check a portion of the API calls?

@jcoffland
Copy link

Why change the output of the Hello World example from Hello World! to SUCCESS? That doesn't make sense to me.

Copy link

@kphillisjr kphillisjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcoffland, @liminzhu, and @obastemur, I believe a code review is a good idea... Here is some notes.

@@ -16,32 +30,40 @@ int main()
JsValueRef result;
unsigned currentSourceContext = 0;

// Your script; try replace hello-world with something else
const char* script = "(()=>{return \'Hello world!\';})()";
const char* script = "(()=>{return \'SUCCESS\';})()";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I Believe it would be best to avoid changing the output strings for the samples whenever possible. This is a hello world example, so printing "Hello World" is the expected output.

@@ -4,8 +4,22 @@
//-------------------------------------------------------------------------------------------------------

#include "ChakraCore.h"
#include <stdlib.h>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to also include stddef.h, This is because nullptr is undefined on Ubuntu Linux 16.04 LTS without this header.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kphillisjr we don't need to include stddef.h explicitly. Feel free to open an issue if you experience a problem. (and please add all the steps to reproduce)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I ran into the issue is that I changed the standard compile flag. The examples currently use -std=c++0x, and I was compiling against the flag -std=c++11.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. We don't force devs to use c++11 though. We just use it internally.

@obastemur
Copy link
Contributor Author

Cool we have so many people on board 👍

@obastemur
Copy link
Contributor Author

Why change the output of the Hello World example from Hello World! to SUCCESS? That doesn't make sense to me.

@jcoffland That comes straight from our native tests. Hello World indeed makes more sense. Thanks for this.

@obastemur why only fail_check a portion of the API calls?

Good idea to show to devs each and every single method may return an error value there.

@obastemur
Copy link
Contributor Author

@kphillisjr @liminzhu @jcoffland Thanks for the review

@obastemur obastemur merged commit 8c26110 into microsoft:master Nov 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants