Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to node-webkit #100

Closed
wants to merge 56 commits into from
Closed

Port to node-webkit #100

wants to merge 56 commits into from

Conversation

@probablycorey
Copy link
Member

probablycorey commented Dec 5, 2012

An experiment to port Atom's WebKit backend from CEF to node-webkit. If this works we will have node.js as a first-class citizen in WebKit's V8 engine. This will remove the need for much of our native code and allow us to use npm modules.

probablycorey-and-nathan and others added 17 commits Dec 1, 2012
No longer using `_.defaults` to assign `window` globals on the Node context's `global` object, because the window gets reloaded but `global` is persisting between reloads, so we'll only ever store values from the first window. We need to explicitly assign globals on an as-needed basis. Currently, we're only assigning document.
I just replace Module._extensions['.coffee'] with a version that caches coffee compilation to `/tmp`  using an md5 digest.
Is scope the correct word?
New OnigScanner(regex) stores the regex on the member var _regex
@nathansobo

This comment has been minimized.

Copy link
Contributor

nathansobo commented on 70cf466 Dec 4, 2012

Hey Corey, an OnigScanner is supposed to hold an array of regular expressions, not just one.

This comment has been minimized.

Copy link
Member

probablycorey replied Dec 4, 2012

@probablycorey
Copy link
Member Author

probablycorey commented Dec 5, 2012

Not ready to merge... Pull request opened as a place for discussion.

@probablycorey
Copy link
Member Author

probablycorey commented Dec 5, 2012

@aroben Could you review the files in src/stdlib/oniguruma/src/

I mostly want to know:

  1. Is any of it wrong.
  2. Could parts be done better or in a more standard C++ way.
OnigRegExp *regExp = *iter;

bool useCachedResult = false;
OnigResult *result = NULL;

This comment has been minimized.

Copy link
@aroben

aroben Dec 6, 2012

Contributor

If you're using C++11, you can (and should) use nullptr instead of NULL.

while (iter != cachedResults.end()) {
delete *iter;
iter = cachedResults.erase(iter);
}

This comment has been minimized.

Copy link
@aroben

aroben Dec 6, 2012

Contributor

If you were to use std::vector<std::unique_ptr<OnigResult>> this would just become cachedResults.clear().

@aroben
Copy link
Contributor

aroben commented Dec 6, 2012

OK, I made it through the C++ code.

@nathansobo
Copy link
Contributor

nathansobo commented Dec 6, 2012

Holy shit balls Adam. That was amazing.

@aroben
Copy link
Contributor

aroben commented Dec 7, 2012

😊 🙇

@nuclearsandwich
Copy link

nuclearsandwich commented Jan 19, 2013

Quick question: It looks like node-webkit uses the Content Shell API instead of CEF. Doesn't that hamstring it by removing things like context menu support? Is that something that is easy to roll ourselves?

@probablycorey
Copy link
Member Author

probablycorey commented Jan 21, 2013

You can just layer context menu support on top of it. CEF3 uses the Content API as well, it just adds a bit of native code on top of it.

@nathansobo
Copy link
Contributor

nathansobo commented Mar 20, 2013

We are not going this route for Node integration. We've hired the maintainer on contract.

@nathansobo nathansobo closed this Mar 20, 2013
maxbrunsfeld pushed a commit that referenced this pull request Jul 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.